Gráfico de Commits

32 Commits

Autor SHA1 Mensagem Data
Kyle Delong a8e3321fbd HPHP/XHP: 'mixed' type in attribute declarations
We'd like to start using ##mixed## instead of ##var## for attribute types to be consistent with Hack. As a followup to this (once released), we would codemod all ##var## to ##mixed##.
2013-07-18 17:28:37 -07:00
Edwin Smith 721f89b890 Flatten directories under runtime/base
This moves runtime/base/*/* to runtime/base, and fixes paths.
2013-07-18 17:28:35 -07:00
Guilherme Ottoni 244d4da93a Replace _ with - in file names under runtime/vm/jit/
Makes things more consistent, at least within this directory.
2013-07-11 15:11:11 -07:00
Sean Cannella c891ec4d62 annotate printf-like functions
- added annotations to a few more functions
- fixed a few bugs exposed by the annotations
2013-07-01 13:41:02 -07:00
Sean Cannella 3d0c614b9a convert enums to enum classes, part 3
C++11 cleanup (clean up easy enums)

This is for runtime/base/... and ended up touching a lot of files
because it turns out we have a lot of reasonably behaved enums.
2013-06-25 13:19:06 -07:00
Edwin Smith 8317e1e59e Ensure all static strings come from the same table.
GetStaticString() is now the only way to get a static string,
so enforce it and short-circuit out when asking for an already-
static string.

Add a GetStaticString(data,len) overload and up some dead code along the way.
2013-06-25 12:22:58 -07:00
Paul Tarjan 1ca7c026d1 Revert double thing
Some tests are failing now that didn't fail in contbuild. Revert until I can look at it.
2013-06-15 23:32:07 -07:00
Paul Tarjan 74b6e69086 fix what I broke with the double diff
I committed the wrong version.
2013-06-15 23:32:06 -07:00
Paul Tarjan 794f87542a try strtod instead of zend version
why is there a zend version and a c version? we mix and match in `is_numeric_string`. I'm worried this is giving me a problem in the filtering of floats.
2013-06-15 23:32:06 -07:00
Edwin Smith f69a002911 Remove the SharedVariant pointer from StringData.
We only use it to lazily grab the hashcode.  So just grab the hashcode
eagerly when we create the string.
2013-06-10 10:14:12 -07:00
Tim Starling 998951619f update copyright date
We did not intend to imply our copyrights last forever

Closes #759
2013-06-03 12:43:56 -07:00
bsimmers cf197fee81 Collapse runtime/vm/translator's contents into runtime/vm/jit
Facebook: ~bsimmers/bin/move-vm-files.sh
2013-06-03 10:54:43 -07:00
aravind fec5acd7ec Treadmill for shared variants
Avoids atomic incRefs and decRefs. StringData no longer needs to
be sweepable for SharedVariants.
2013-05-23 20:02:40 -07:00
aravind 7fbef94637 Optimize SharedVariant refcounting
Elide refcounting for non-refcounted TVs in SharedVariant.
Additionally for apc_store, if TV is a static string, use
the static version insted of the given one.
2013-05-20 13:52:25 -07:00
Mark Williams 1489c698dc Use AtomicHashMap for NamedEntities and StaticStrings
Its faster as long as you have a good starting point.
Add RuntimeOptions to specify initial sizes.
2013-05-20 12:04:09 -07:00
Sara Golemon 6ec64e8bf9 make #includes consistent
I was learning from @jdelong and he said that you should use
double quotes for local includes and angle brackets for library
includes. I asked why our code was the way it was, and he said he wanted
to clean it up. I beat him to it :)

Conflicts:

	hphp/runtime/base/server/admin_request_handler.cpp
	hphp/runtime/vm/named_entity.h
2013-05-15 13:05:06 -07:00
Paul Tarjan fef62f03a2 kill VM namespace
Now that HHVM is the default runtime, this namespace doesn't mean anything.
2013-05-15 13:05:05 -07:00
Ben Maurer e0f8f5bdff Use equals() in equals(StringData, StringData)
Equals is faster in a few ways.
(1) no call to memcmp unless string sizes are the same
(2) does a fast check for either of the strings being static
    before any calls to is_numeric_string
2013-05-10 10:54:39 -07:00
Edwin Smith d15e609333 Revert "Do copying with the AttachLiteral constructors."
Revert "Explicit CopyString, remove (const char*) constructors."
2013-05-06 09:31:26 -07:00
Edwin Smith b7cc57a8db Explicit CopyString, remove (const char*) constructors.
This gets rid of the (litstr) StringData and StackStringData
constructors, but keeps String(litstr).  Also rename all
the instances of AttachLiteral to CopyString, since they now
mean the same thing.
2013-04-30 09:27:03 -07:00
Edwin Smith 410a105184 Do copying with the AttachLiteral constructors.
And, remove the IsLiteral string kind.  This removes the hazard of
creating a string whose data is freed before the string.  Callsites
passing in a literal should use StaticString.  Everything else
can use CopyString or AttachString.
2013-04-26 09:29:48 -07:00
Edwin Smith f29ee5314d Remove String::operator const char*().
Too many ways to shoot self in foot with this gem.
2013-04-25 11:34:21 -07:00
Mark Williams 0526e973c5 Fix literal string to int/double conversion under hhir
The simplifier would convert strictly-integer strings to their
integer equivalent, and all other strings to zero. This meant
that eg "1.1" became zero, as did "1x". Normally, such strings
are converted at the ast level, so it was hard to expose the bug,
but eg test/quick/cnvInt.php would fail if you turned off
JitEnableRenameFunctions (and its turned off in repo mode, so the
repo mode test was failing).

The same issue was present in ConvStrToDbl, but there was a bug in
StringData::isNumeric causing it to return true for a weakly-numeric string,
where its contract is to return false (and it did return false for an
equivalent, non-static string). Once I fixed that bug, I had to fix the
bug in ConvStrToDbl.
2013-04-24 12:42:45 -07:00
hermanv 5e6cce4db5 Conversions in IR
Rolls up all previous diffs into a single diff and uses the CALL_OPCODE macro.
2013-04-18 13:55:38 -07:00
mwilliams 5f9df0e7c6 Rework constants to use the target cache exclusively
Make the targetcache the one true home for constants,
so we dont need to (also) insert them all into
VMExecutionContext::m_constants (which is now gone).

By also making "non-volatile" constants persistent, we save
initializing most of them at all in RepoAuthoritative mode.
2013-04-18 12:19:05 -07:00
ptarjan 0038b76a58 kill TAINTED code
While I was working on the TestCodeRun refactor I found two tests about Tainted code. I looked into it and coulnd't get HHVM to compile with TAINTED=1. Then I checked and none of the extension functions we exposed about tainting were used in WWW. Scratching my head I asked, @srenfro and @jdelong, who  thought it was dead. So I killed this zombie.
2013-04-12 12:04:04 -07:00
mwilliams a7a3c2e8cc Get rid of hphpc's switch helpers
hashForIntSwitch and hashForStringSwitch were used as part of
an efficient switch mechanism in hphpc, but are now dead.
2013-03-12 14:22:14 -07:00
aalexandre 26178124a4 Eliminate int32, uint32, int16, uint16, int8, uint8.
This concludes the inttypes replacement.
These replacement have been mostly mechanical
with the use of cxx_replace.
2013-03-09 10:25:16 -08:00
mwilliams fea70b0391 Kill more dead code
Kills
 - ClassPropTable
 - ObjectStaticCallbacks
 - MethodCallPackage
 - StaticStringProxy
 - VariantProxy
 - TheStaticStringSet
 - argvalAt
 - refvalAt

Also removes the more-or-less unused StringData in each
StaticString.
2013-03-08 19:13:05 -08:00
aalexandre b3b41e08bb Replaced NULL with nullptr 2013-02-19 06:57:54 -08:00
mwilliams f109b02c7d Make stack based StringData safer
If you allocate a StringData on the stack, and it escapes,
you're in trouble. Make the destructor assert by default,
and add a StackStringData which does the appropriate
refCounting and checking.
2013-02-13 06:42:47 -08:00
Jordan Delong 363d1bb20f Code move src/ -> hphp/
This change is mostly for FB internal organizational reasons.
Building is not effected beyond the fact that the target now
lands in hphp/hhvm/hhvm rather than src/hhvm/hhvm.
2013-02-11 02:10:41 -08:00