Commit Graph

228 Commits

Author SHA1 Message Date
yangguo@chromium.org
02674ee414 Keep two empty lines between declarations for cpp files
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/18509003

Patch from Haitao Feng <haitao.feng@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15510 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 09:52:11 +00:00
yurys@chromium.org
678c9dc940 Remove #include "cpu-profiler-inl.h" from v8.h
This significantly reduces amount of files to be recompiled after changes in cpu-profiler.h and its dependencies.

BUG=None
R=loislo@chromium.org, yangguo@chromium.org

Review URL: https://codereview.chromium.org/18522004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15482 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-03 15:39:18 +00:00
danno@chromium.org
77c20c30a3 Revert r15419: "Generate StoreGlobal stubs with Hydrogen"
TBR=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/18357004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15427 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 15:12:21 +00:00
danno@chromium.org
a3bce19868 Generate StoreGlobal stubs with Hydrogen
- Constants globals are inlined into Hydrogen code using code dependencies that invalidate the Crankshafted code when global PropertyCells or the global object change.
- The more general case generates code that is just as good as the hand-written assembly stubs on all platforms.

R=ulan@chromium.org

Review URL: https://codereview.chromium.org/16925008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15419 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 13:22:13 +00:00
bmeurer@chromium.org
9e0f0a73dc Get rid of ZoneScope completely.
There's no need to differentiate between an actual Zone and its
scope. Instead we bind the lifetime of the Zone memory to the
lifetime of the Zone itself, which is way easier to understand
than having to dig through the code looking for zone scopes.

Depends on https://codereview.chromium.org/17826004/

R=danno@chromium.org
BUG=

Review URL: https://codereview.chromium.org/17827005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15337 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-26 13:36:16 +00:00
yurys@chromium.org
c7b3ef0e05 Make sure ExternalCallbackScope is always created when VM state changes to EXTERNAL
ExternalCallbackScope is used to let CPU profiler know which API callback is being executed. Whenever such callback is called we should create VMState<ETERNAL> and ExternalCallbackScope. This patch fixes several places where VMState<ETERNAL> went without ExternalCallbackScope.

BUG=244580
R=dcarney@chromium.org, svenpanne@chromium.org

Review URL: https://codereview.chromium.org/17059005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15249 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 14:47:35 +00:00
mvstanton@chromium.org
c70b41684d Use type feedback for Array (non-constructor) call sites.
BUG=
R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/17155010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15201 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-19 09:25:24 +00:00
danno@chromium.org
61a23ceb4d Refactor only: Rename JSGlobaPropertyCell to PropertyCell
R=mvstanton@chromium.org

Review URL: https://codereview.chromium.org/17064002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-14 16:06:12 +00:00
danno@chromium.org
1b89cbf817 Separate Cell and PropertyCell spaces
This makes it possible to store additional information on property cells, for example Type and optimized Code dependencies.

R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/16631002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15089 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-12 15:03:44 +00:00
olivf@chromium.org
946ea53264 use compare nil ic only for non-strict equality. strict-equality only has one check and cannot deopt. should therefore not be part of the stub.
BUG=
R=rossberg@chromium.org

Review URL: https://codereview.chromium.org/16732002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15045 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-10 15:47:23 +00:00
olivf@chromium.org
3a26dda780 revert accidental dcommit
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15044 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-10 15:43:40 +00:00
olivf@chromium.org
73b7ab9ae6 remove equality kind from compare nil ic
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15042 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-10 15:30:02 +00:00
dcarney@chromium.org
b12e6a9c1e adjust assertions for addition of default value
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/16136012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15029 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-10 09:35:47 +00:00
verwaest@chromium.org
5e8679beea Remove the optimized construct stub.
R=mstarzinger@chromium.org

Review URL: https://chromiumcodereview.appspot.com/15993016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14946 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-05 08:43:25 +00:00
mstarzinger@chromium.org
f8db2414f2 Deprecate FACTORY helper macro.
This removes the FACTORY helper macro to avoid accidental TLS access
when using the factory. Most internal code has access to the Isolate by
now whereas tests which are not performance critical still heavily use
TLS access through explicit Isolate::Current() calls.

R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/16337005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14931 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-04 10:30:05 +00:00
olivf@chromium.org
7aa74c3dc5 fix some names in compare nil ic
The compare nil ic introduces a mechanism called lightweight miss. The
idea is to insert a direct call to the miss handler instead of going
through the deopt routine. This can be use for uninitialized stubs, to
directly jump to the runtime.

This cl
1. Cleans up naming
2. localizes the lightweight miss functionality on the only user (compare nil ic)
3. fixes DoCodegen, to actually call the correct method (uninitialized vs initialized)

BUG=
R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/15806005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14798 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-24 11:44:55 +00:00
titzer@chromium.org
94b4240f5c Introduce ObjectAccess, which is used by LoadNamedField and StoreNamedField to denote what parts of an object are referred to by a given load or store. Refactor HGraphBuilder to use ObjectAccess, which removes the need to manually set GVN flags and simplifies the code as well.
Review URL: https://codereview.chromium.org/14284010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14791 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-24 08:38:21 +00:00
verwaest@chromium.org
8fed3da4a4 Zap map value in the stub-cache on clear.
The empty_string is a valid key for keyed loads and stores.

BUG=
R=mstarzinger@chromium.org

Review URL: https://chromiumcodereview.appspot.com/15565002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14732 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-21 12:59:48 +00:00
dcarney@chromium.org
881476a7af new style of property/function callbacks
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/12494012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14725 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-21 06:36:24 +00:00
olivf@chromium.org
c3dde4bd9d Encapsulating Type information in the CompareICStub
Encapsulate type information in a convenient wrapper instead of storing it in a naked bitfield. This especially facilitates transitioning to a new state and converting from/to the extraICState representation. Additionally cleaning up ToBooleanICStub::Types for consistency.

BUG=
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/14862009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14704 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-16 10:59:17 +00:00
verwaest@chromium.org
52008429b7 Use mutable heapnumbers to store doubles in fields.
R=danno@chromium.org

Review URL: https://chromiumcodereview.appspot.com/14850006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14597 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-08 15:02:08 +00:00
verwaest@chromium.org
51dded6e9c Turn the load field code stub into a hydrogen code stub.
Review URL: https://chromiumcodereview.appspot.com/14847004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14526 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-02 16:32:47 +00:00
verwaest@chromium.org
84fd96e4d1 Cleanup IC heuristics.
Review URL: https://chromiumcodereview.appspot.com/14611006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14524 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-02 15:42:22 +00:00
verwaest@chromium.org
fd9c82a618 Update deprecated maps before generating optimized code.
Review URL: https://chromiumcodereview.appspot.com/14847008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14522 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-02 15:40:07 +00:00
verwaest@chromium.org
99e17bb12a Track storage types of instance variables.
Review URL: https://chromiumcodereview.appspot.com/14146005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14464 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-26 15:30:41 +00:00
yangguo@chromium.org
d1df0e631d Clean up VMState a little bit.
R=svenpanne@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/14139033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14421 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-24 14:44:08 +00:00
danno@chromium.org
f8ddf3a262 Add monomorphic CompareNilICs and Crankshaft support
R=mvstanton@chromium.org

Review URL: https://codereview.chromium.org/14367018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14407 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-24 11:32:17 +00:00
verwaest@chromium.org
c96a928c75 Disentangle field from transition stores.
Review URL: https://chromiumcodereview.appspot.com/14063006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14223 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-11 09:48:03 +00:00
ulan@chromium.org
eee5884f8d Add extra flag for load-ic stubs in code cache.
This allows to distinguish between stubs compiled for the current object from
stubs compiled for objects that have the current object as a prototype.

BUG=v8:2593
R=verwaest@chromium.org

Review URL: https://chromiumcodereview.appspot.com/13552003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14132 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-04 08:29:25 +00:00
verwaest@chromium.org
a8b3215afa Change LookupForWrite to always do a full lookup and check the result.
If we find a property in the prototype-chain that we can overwrite, and
we have a transition, keep the holder in the lookup-result as the actual
holder. We will need it for the consistency-check in GenerateStoreField.

By directly checking the entire chain we avoid having to lazily bail out
to a copy of the miss stub while generating the Field Store IC.

Currently this CL disallows a normal non-receiver holder, given that
that would require a positive lookup + details verification to ensure
the property did not become read-only. This fixes the regressions in the
attached tests.

Review URL: https://chromiumcodereview.appspot.com/12810006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14061 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-25 12:55:27 +00:00
danno@chromium.org
ffd0c712e8 Implement many KeyedStoreStubs using Crankshaft
- Addition of a compiled hydrogen stub for KeyedStores.
- Inlining of "grow" stubs into OPTIMIZED_FUNCTIONs
- Addition of new "ignore OOB" ic stub that silently swallows out-of-bounds stores to external typed arrays.
- Addition of new "copy-on-write" ic stub that inlines allocation and copying operations for cow array
- New stub are generated with Crankshaft, so they are automatically inlined into OPTIMIZED_FUNCTIONs

Review URL: https://codereview.chromium.org/12221064

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14001 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-20 10:37:13 +00:00
verwaest@chromium.org
37a2e32496 Unify kMaxArguments with number of bits used to encode it.
Increase the number of bits by 1 by making Flags unsigned.

BUG=chromium:211741

Review URL: https://chromiumcodereview.appspot.com/12886008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13964 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-18 13:35:17 +00:00
verwaest@chromium.org
88b8715f95 Load/Store stub compilation refactoring.
Review URL: https://chromiumcodereview.appspot.com/12426008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13954 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-15 12:07:35 +00:00
verwaest@chromium.org
569d9c59b9 Refactoring Store ICs. A first step towards polymorphic store ICs.
Review URL: https://chromiumcodereview.appspot.com/12781004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13934 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-13 14:11:05 +00:00
danno@chromium.org
bbc599f334 Unify grow mode and stub kind
In the process, ensure that transition-causing element stores handle all cases of the transitioned receiver map.

Review URL: https://codereview.chromium.org/12390031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13850 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-06 21:51:07 +00:00
verwaest@chromium.org
34697f5b12 Make IC patching resilient to flushing of the original target() ic.
Review URL: https://chromiumcodereview.appspot.com/12451003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13831 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-05 17:38:35 +00:00
rossberg@chromium.org
5c93b18eb2 ES6 symbols: Allow symbols as property names
Since symbols and strings share a common representation, most of this change is about consistently replacing 'String' with 'Name' in all places where property names are expected. In particular, no new logic at all is necessary for maps, property dictionaries, or transitions. :) The only places where an actual case distinction is needed have to do with generated type checks, and with conversions of names to strings (especially in logger and profiler).

Left in some TODOs wrt to the API: interceptors and native getters don't accept symbols as property names yet, because that would require extending the external v8.h.

(Baseline CL: https://codereview.chromium.org/12296026/)

R=verwaest@chromium.org,mstarzinger@chromium.org
BUG=v8:2158

Review URL: https://codereview.chromium.org/12330012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13811 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-04 15:00:57 +00:00
verwaest@chromium.org
590a3f8811 Polymorphism support for load IC.
Review URL: https://chromiumcodereview.appspot.com/12340112

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13801 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-04 14:03:27 +00:00
rossberg@chromium.org
090d09d685 ES6 symbols: Implement Symbol intrinsic and basic functionality
- Add --harmony-symbols flag.
- Add Symbol constructor; allow symbols as (unreplaced) return value from constructors.
- Introduce %CreateSymbol and %_IsSymbol natives and respective instructions.
- Extend 'typeof' code generation to handle symbols.
- Extend CompareIC with a UNIQUE_NAMES state that (uniformly) handles internalized strings and symbols.
- Property lookup delegates to SymbolDelegate object for symbols, which only carries the toString method.
- Extend Object.prototype.toString to recognise symbols.

Per the current draft spec, symbols are actually pseudo objects that are frozen with a null prototype and only one property (toString). For simplicity, we do not treat them as proper objects for now, although typeof will return "object". Only property access works as if they were (frozen) objects (via the internal delegate object).

(Baseline CL: https://codereview.chromium.org/12223071/)

R=mstarzinger@chromium.org
BUG=v8:2158

Review URL: https://codereview.chromium.org/12296026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13786 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-01 13:28:55 +00:00
rossberg@chromium.org
55f93b5532 Renamed "symbols" to "internalized strings" throughout the code base,
in preparation of the introduction of ES6 'symbols' (aka private/unique names).

The SymbolTable became the StringTable. I also made sure to adapt all comments. The only remaining use of the term "symbol" (other than unrelated uses in the parser and such) is now 'NewSymbol' in the API and the 'V8.KeyedLoadGenericSymbol' counter, changing which might break embedders.

The one functional change in this CL is that I removed the former 'empty_string' constant, since it is redundant given the 'empty_symbol' constant that we also had (and both were used inconsistently).

R=yangguo@chromium.org
BUG=

Review URL: https://codereview.chromium.org/12210083

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13781 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-28 17:03:34 +00:00
verwaest@chromium.org
5a543d683a Order arguments of ComputeMonomorphicFlags to match ComputeFlags.
Review URL: https://chromiumcodereview.appspot.com/12226090

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13769 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-27 15:33:37 +00:00
verwaest@chromium.org
3ab255f55d Currently this mostly just moves code around.
- Later the different parts will become individual code objects that tailcall into one another.
- The mapcheck/symbol check still needs to be separated from the overall prototype-chain check so that the ICs can reuse the handlers.

Review URL: https://chromiumcodereview.appspot.com/12209021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13768 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-27 15:28:53 +00:00
svenpanne@chromium.org
c26d100b10 Avoid TLS accesses in Object::Lookup and Object::GetPrototype.
Both methods were among the top causes for TLS accesses.

BUG=v8:2487

Review URL: https://codereview.chromium.org/12319144

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13759 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-27 13:22:29 +00:00
svenpanne@chromium.org
6e829ed485 Added Isolate parameter to CodeStub::GetCode().
According to gprof, this was the #1 cause for TLS access during an Octane run.

BUG=v8:2487

Review URL: https://codereview.chromium.org/12317141

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13756 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-27 12:33:24 +00:00
svenpanne@chromium.org
fb6776e84a Made Isolate a mandatory parameter for everything Handle-related.
Unified parameter order of CreateHandle with the rest of v8 on the way. A few
Isolate::Current()s had to be introduced, which is not nice, and not every place
will win a beauty contest, but we can clean this up later easily in smaller steps.

Review URL: https://codereview.chromium.org/12300018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13717 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-25 14:46:09 +00:00
svenpanne@chromium.org
71a26c928a Make the Isolate parameter mandatory for internal HandleScopes.
Improved Frames and their iterators on the way, too.

BUG=v8:2487

Review URL: https://codereview.chromium.org/12254007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13674 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-15 09:27:10 +00:00
dcarney@chromium.org
0da6e525b7 Split AccessorInfo into DeclaredAccessorInfo and ExecutableAccessorInfo
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/12213012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13649 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-12 14:33:08 +00:00
verwaest@chromium.org
f08b6ecac7 Split CompileCallConstant into logical parts for Frontend and Backend.
Initial step towards separating IC (map check(s)), handler frontend
(prototype-check) and handler backend (actual handler code).

- Still need to split the map-check (IC) from rest of the prototype
  chain check.
- Still need to turn different parts in own code objects and cache them
  in more optimal places.

Review URL: https://chromiumcodereview.appspot.com/12207016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13604 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-06 11:48:29 +00:00
verwaest@chromium.org
0d89d9a019 Merge KeyedLoad and NamedLoad stub compiler code.
Review URL: https://chromiumcodereview.appspot.com/12094082

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13579 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-01 13:39:36 +00:00
verwaest@chromium.org
b1e5157e7b Support slow-mode prototypes for load and call ICs.
This changes LoadNonExistent to handle negative lookups as well.

Review URL: https://chromiumcodereview.appspot.com/12092043

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13571 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-31 16:18:18 +00:00