Revision: 18103
Author: [email protected]
Date: Wed Nov 27 14:00:54 2013 UTC
Log: Remove the strict-mode flag from store handlers. It's only
relevant to the IC stub.
[email protected]
Review URL: https://chromiumcodereview.appspot.com/91413003
http://code.google.com/p/v8/source/detail?r=18103
Modified:
/branches/bleeding_edge/src/builtins.cc
/branches/bleeding_edge/src/builtins.h
/branches/bleeding_edge/src/code-stubs.h
/branches/bleeding_edge/src/ic.cc
/branches/bleeding_edge/src/ic.h
=======================================
--- /branches/bleeding_edge/src/builtins.cc Tue Nov 19 13:38:15 2013 UTC
+++ /branches/bleeding_edge/src/builtins.cc Wed Nov 27 14:00:54 2013 UTC
@@ -1383,11 +1383,6 @@
static void Generate_StoreIC_Slow(MacroAssembler* masm) {
StoreIC::GenerateSlow(masm);
}
-
-
-static void Generate_StoreIC_Slow_Strict(MacroAssembler* masm) {
- StoreIC::GenerateSlow(masm);
-}
static void Generate_StoreIC_Initialize(MacroAssembler* masm) {
@@ -1418,11 +1413,6 @@
static void Generate_StoreIC_Normal(MacroAssembler* masm) {
StoreIC::GenerateNormal(masm);
}
-
-
-static void Generate_StoreIC_Normal_Strict(MacroAssembler* masm) {
- StoreIC::GenerateNormal(masm);
-}
static void Generate_StoreIC_Megamorphic(MacroAssembler* masm) {
@@ -1478,11 +1468,6 @@
static void Generate_KeyedStoreIC_Slow(MacroAssembler* masm) {
KeyedStoreIC::GenerateSlow(masm);
}
-
-
-static void Generate_KeyedStoreIC_Slow_Strict(MacroAssembler* masm) {
- KeyedStoreIC::GenerateSlow(masm);
-}
static void Generate_KeyedStoreIC_Initialize(MacroAssembler* masm) {
@@ -1667,13 +1652,14 @@
functions->extra_args =
NO_EXTRA_ARGUMENTS; \
++functions;
-#define DEF_FUNCTION_PTR_H(aname, kind,
extra) \
+#define DEF_FUNCTION_PTR_H(aname,
kind) \
functions->generator =
FUNCTION_ADDR(Generate_##aname); \
functions->c_code =
NULL; \
functions->s_name =
#aname; \
functions->name =
k##aname; \
functions->flags =
Code::ComputeFlags( \
- Code::HANDLER, MONOMORPHIC, extra, Code::NORMAL,
Code::kind); \
+ Code::HANDLER, MONOMORPHIC,
Code::kNoExtraICState, \
+ Code::NORMAL,
Code::kind); \
functions->extra_args =
NO_EXTRA_ARGUMENTS; \
++functions;
@@ -1805,7 +1791,7 @@
reinterpret_cast<Code**>(builtin_address(k##name)); \
return Handle<Code>(code_address); \
}
-#define DEFINE_BUILTIN_ACCESSOR_H(name, kind, extra) \
+#define DEFINE_BUILTIN_ACCESSOR_H(name, kind) \
Handle<Code> Builtins::name() { \
Code** code_address = \
reinterpret_cast<Code**>(builtin_address(k##name)); \
=======================================
--- /branches/bleeding_edge/src/builtins.h Fri Nov 22 10:21:47 2013 UTC
+++ /branches/bleeding_edge/src/builtins.h Wed Nov 27 14:00:54 2013 UTC
@@ -216,16 +216,13 @@
CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, V)
// Define list of builtin handlers implemented in assembly.
-#define BUILTIN_LIST_H(V) \
- V(LoadIC_Slow, LOAD_IC, Code::kNoExtraICState) \
- V(KeyedLoadIC_Slow, KEYED_LOAD_IC, Code::kNoExtraICState) \
- V(StoreIC_Slow, STORE_IC, Code::kNoExtraICState) \
- V(StoreIC_Slow_Strict, STORE_IC, kStrictMode) \
- V(KeyedStoreIC_Slow, KEYED_STORE_IC, Code::kNoExtraICState)\
- V(KeyedStoreIC_Slow_Strict, KEYED_STORE_IC, kStrictMode) \
- V(LoadIC_Normal, LOAD_IC, Code::kNoExtraICState) \
- V(StoreIC_Normal, STORE_IC, Code::kNoExtraICState) \
- V(StoreIC_Normal_Strict, STORE_IC, kStrictMode)
+#define BUILTIN_LIST_H(V) \
+ V(LoadIC_Slow, LOAD_IC) \
+ V(KeyedLoadIC_Slow, KEYED_LOAD_IC) \
+ V(StoreIC_Slow, STORE_IC) \
+ V(KeyedStoreIC_Slow, KEYED_STORE_IC) \
+ V(LoadIC_Normal, LOAD_IC) \
+ V(StoreIC_Normal, STORE_IC)
#ifdef ENABLE_DEBUGGER_SUPPORT
// Define list of builtins used by the debugger implemented in assembly.
@@ -314,7 +311,7 @@
enum Name {
#define DEF_ENUM_C(name, ignore) k##name,
#define DEF_ENUM_A(name, kind, state, extra) k##name,
-#define DEF_ENUM_H(name, kind, extra) k##name,
+#define DEF_ENUM_H(name, kind) k##name,
BUILTIN_LIST_C(DEF_ENUM_C)
BUILTIN_LIST_A(DEF_ENUM_A)
BUILTIN_LIST_H(DEF_ENUM_H)
@@ -341,7 +338,7 @@
#define DECLARE_BUILTIN_ACCESSOR_C(name, ignore) Handle<Code> name();
#define DECLARE_BUILTIN_ACCESSOR_A(name, kind, state, extra) \
Handle<Code> name();
-#define DECLARE_BUILTIN_ACCESSOR_H(name, kind, extra) Handle<Code> name();
+#define DECLARE_BUILTIN_ACCESSOR_H(name, kind) Handle<Code> name();
BUILTIN_LIST_C(DECLARE_BUILTIN_ACCESSOR_C)
BUILTIN_LIST_A(DECLARE_BUILTIN_ACCESSOR_A)
BUILTIN_LIST_H(DECLARE_BUILTIN_ACCESSOR_H)
=======================================
--- /branches/bleeding_edge/src/code-stubs.h Tue Nov 19 12:04:54 2013 UTC
+++ /branches/bleeding_edge/src/code-stubs.h Wed Nov 27 14:00:54 2013 UTC
@@ -958,9 +958,8 @@
class StoreGlobalStub : public HandlerStub {
public:
- StoreGlobalStub(StrictModeFlag strict_mode, bool is_constant) {
- bit_field_ = StrictModeBits::encode(strict_mode) |
- IsConstantBits::encode(is_constant);
+ explicit StoreGlobalStub(bool is_constant) {
+ bit_field_ = IsConstantBits::encode(is_constant);
}
Handle<Code> GetCodeCopyFromTemplate(Isolate* isolate,
@@ -1003,9 +1002,8 @@
virtual int NotMissMinorKey() { return GetExtraICState(); }
Major MajorKey() { return StoreGlobal; }
- class StrictModeBits: public BitField<StrictModeFlag, 0, 1> {};
- class IsConstantBits: public BitField<bool, 1, 1> {};
- class RepresentationBits: public BitField<Representation::Kind, 2, 8> {};
+ class IsConstantBits: public BitField<bool, 0, 1> {};
+ class RepresentationBits: public BitField<Representation::Kind, 1, 8> {};
int bit_field_;
=======================================
--- /branches/bleeding_edge/src/ic.cc Wed Nov 27 09:24:42 2013 UTC
+++ /branches/bleeding_edge/src/ic.cc Wed Nov 27 14:00:54 2013 UTC
@@ -1633,7 +1633,8 @@
Handle<JSObject> receiver = Handle<JSObject>::cast(object);
Handle<JSObject> holder(lookup->holder());
- StoreStubCompiler compiler(isolate(), strict_mode(), kind());
+ // Handlers do not use strict mode.
+ StoreStubCompiler compiler(isolate(), kNonStrictMode, kind());
switch (lookup->type()) {
case FIELD:
return compiler.CompileStoreField(receiver, lookup, name);
@@ -1661,7 +1662,7 @@
Handle<GlobalObject> global = Handle<GlobalObject>::cast(receiver);
Handle<PropertyCell> cell(global->GetPropertyCell(lookup),
isolate());
Handle<Type> union_type = PropertyCell::UpdatedType(cell, value);
- StoreGlobalStub stub(strict_mode(), union_type->IsConstant());
+ StoreGlobalStub stub(union_type->IsConstant());
Handle<Code> code = stub.GetCodeCopyFromTemplate(
isolate(), receiver->map(), *cell);
@@ -1670,9 +1671,7 @@
return code;
}
ASSERT(holder.is_identical_to(receiver));
- return strict_mode() == kStrictMode
- ? isolate()->builtins()->StoreIC_Normal_Strict()
- : isolate()->builtins()->StoreIC_Normal();
+ return isolate()->builtins()->StoreIC_Normal();
case CALLBACKS: {
if (kind() == Code::KEYED_STORE_IC) break;
Handle<Object> callback(lookup->GetCallbackObject(), isolate());
=======================================
--- /branches/bleeding_edge/src/ic.h Fri Nov 22 15:06:20 2013 UTC
+++ /branches/bleeding_edge/src/ic.h Wed Nov 27 14:00:54 2013 UTC
@@ -606,11 +606,7 @@
}
virtual Handle<Code> slow_stub() const {
- if (strict_mode() == kStrictMode) {
- return isolate()->builtins()->StoreIC_Slow_Strict();
- } else {
- return isolate()->builtins()->StoreIC_Slow();
- }
+ return isolate()->builtins()->StoreIC_Slow();
}
virtual Handle<Code> pre_monomorphic_stub() {
@@ -723,11 +719,7 @@
}
}
virtual Handle<Code> slow_stub() const {
- if (strict_mode() == kStrictMode) {
- return isolate()->builtins()->KeyedStoreIC_Slow_Strict();
- } else {
- return isolate()->builtins()->KeyedStoreIC_Slow();
- }
+ return isolate()->builtins()->KeyedStoreIC_Slow();
}
virtual Handle<Code> megamorphic_stub() {
if (strict_mode() == kStrictMode) {
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.