Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Unified Diff: src/code-stubs.h

Issue 128683002: Array constructor can be simplified by loading context from JSFunction. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Simple ports. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index da86071b9db94f7ea896be84d19b3dcb68e5c915..090483bb38859804fc2abf60a739936963c365cf 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -1987,16 +1987,9 @@ class TransitionElementsKindStub : public HydrogenCodeStub {
};
-enum ContextCheckMode {
- CONTEXT_CHECK_REQUIRED,
- CONTEXT_CHECK_NOT_REQUIRED,
- LAST_CONTEXT_CHECK_MODE = CONTEXT_CHECK_NOT_REQUIRED
-};
-
-
class ArrayConstructorStubBase : public HydrogenCodeStub {
public:
- ArrayConstructorStubBase(ElementsKind kind, ContextCheckMode context_mode,
+ ArrayConstructorStubBase(ElementsKind kind,
AllocationSiteOverrideMode override_mode) {
// It only makes sense to override local allocation site behavior
// if there is a difference between the global allocation site policy
@@ -2004,8 +1997,7 @@ class ArrayConstructorStubBase : public HydrogenCodeStub {
ASSERT(override_mode != DISABLE_ALLOCATION_SITES ||
AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE);
bit_field_ = ElementsKindBits::encode(kind) |
- AllocationSiteOverrideModeBits::encode(override_mode) |
- ContextCheckModeBits::encode(context_mode);
+ AllocationSiteOverrideModeBits::encode(override_mode);
}
ElementsKind elements_kind() const {
@@ -2016,10 +2008,6 @@ class ArrayConstructorStubBase : public HydrogenCodeStub {
return AllocationSiteOverrideModeBits::decode(bit_field_);
}
- ContextCheckMode context_mode() const {
- return ContextCheckModeBits::decode(bit_field_);
- }
-
static void GenerateStubsAheadOfTime(Isolate* isolate);
static void InstallDescriptors(Isolate* isolate);
@@ -2035,12 +2023,10 @@ class ArrayConstructorStubBase : public HydrogenCodeStub {
// Ensure data fits within available bits.
STATIC_ASSERT(LAST_ALLOCATION_SITE_OVERRIDE_MODE == 1);
- STATIC_ASSERT(LAST_CONTEXT_CHECK_MODE == 1);
class ElementsKindBits: public BitField<ElementsKind, 0, 8> {};
class AllocationSiteOverrideModeBits: public
BitField<AllocationSiteOverrideMode, 8, 1> {}; // NOLINT
- class ContextCheckModeBits: public BitField<ContextCheckMode, 9, 1> {};
uint32_t bit_field_;
DISALLOW_COPY_AND_ASSIGN(ArrayConstructorStubBase);
@@ -2051,9 +2037,8 @@ class ArrayNoArgumentConstructorStub : public ArrayConstructorStubBase {
public:
ArrayNoArgumentConstructorStub(
ElementsKind kind,
- ContextCheckMode context_mode = CONTEXT_CHECK_REQUIRED,
AllocationSiteOverrideMode override_mode = DONT_OVERRIDE)
- : ArrayConstructorStubBase(kind, context_mode, override_mode) {
+ : ArrayConstructorStubBase(kind, override_mode) {
}
virtual Handle<Code> GenerateCode(Isolate* isolate);
@@ -2077,9 +2062,8 @@ class ArraySingleArgumentConstructorStub : public ArrayConstructorStubBase {
public:
ArraySingleArgumentConstructorStub(
ElementsKind kind,
- ContextCheckMode context_mode = CONTEXT_CHECK_REQUIRED,
AllocationSiteOverrideMode override_mode = DONT_OVERRIDE)
- : ArrayConstructorStubBase(kind, context_mode, override_mode) {
+ : ArrayConstructorStubBase(kind, override_mode) {
}
virtual Handle<Code> GenerateCode(Isolate* isolate);
@@ -2103,9 +2087,8 @@ class ArrayNArgumentsConstructorStub : public ArrayConstructorStubBase {
public:
ArrayNArgumentsConstructorStub(
ElementsKind kind,
- ContextCheckMode context_mode = CONTEXT_CHECK_REQUIRED,
AllocationSiteOverrideMode override_mode = DONT_OVERRIDE)
- : ArrayConstructorStubBase(kind, context_mode, override_mode) {
+ : ArrayConstructorStubBase(kind, override_mode) {
}
virtual Handle<Code> GenerateCode(Isolate* isolate);
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698