| Index: src/code-stub-assembler.cc
|
| diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc
|
| index 53f52b504d6eef27da6d564f5dfee2e5e32071c6..27cd9e637a450de713bbdafbedd33687f1fb054c 100644
|
| --- a/src/code-stub-assembler.cc
|
| +++ b/src/code-stub-assembler.cc
|
| @@ -1309,6 +1309,84 @@ Node* CodeStubAssembler::BitFieldDecode(Node* word32, uint32_t shift,
|
| Int32Constant(shift));
|
| }
|
|
|
| +#define ENABLE_TRAMPOLINE_WORKAROUND 0
|
| +
|
| +void CodeStubAssembler::Boom() {
|
| + Node* object = IntPtrConstant(1);
|
| + Node* context = NoContextConstant();
|
| +
|
| + Label call_runtime(this), return_true(this);
|
| +
|
| + Label if_keyisindex(this), if_keyisnotindex(this);
|
| + {
|
| + Label if_ok(this);
|
| + Branch(WordEqual(object, IntPtrConstant(1)), &return_true, &if_ok);
|
| + Bind(&if_ok);
|
| + }
|
| + Branch(WordEqual(object, IntPtrConstant(2)), &if_keyisnotindex,
|
| + &call_runtime);
|
| +
|
| + Bind(&if_keyisnotindex);
|
| + {
|
| + Variable var_boom(this, MachineRepresentation::kWord32);
|
| +
|
| +#if ENABLE_TRAMPOLINE_WORKAROUND
|
| + Label return_true_trampo(this);
|
| +#endif
|
| + Label outer_loop(this, &var_boom);
|
| + var_boom.Bind(Int32Constant(1));
|
| + Goto(&outer_loop);
|
| + Bind(&outer_loop);
|
| + {
|
| + Label next_outer(this);
|
| + {
|
| + Label if_isfastmap(this), if_isslowmap(this);
|
| + Branch(WordEqual(object, IntPtrConstant(10)), &if_isfastmap,
|
| + &if_isslowmap);
|
| +
|
| + Bind(&if_isfastmap);
|
| + {
|
| + Label inner_loop(this, &var_boom);
|
| + Goto(&inner_loop);
|
| + Bind(&inner_loop);
|
| + {
|
| +#if ENABLE_TRAMPOLINE_WORKAROUND
|
| + Branch(WordEqual(object, IntPtrConstant(20)), &next_outer,
|
| + &return_true_trampo);
|
| +#else
|
| + Branch(WordEqual(object, IntPtrConstant(20)), &next_outer,
|
| + &return_true);
|
| +#endif
|
| + }
|
| + }
|
| +
|
| + Bind(&if_isslowmap);
|
| + {
|
| +#if ENABLE_TRAMPOLINE_WORKAROUND
|
| + Goto(&return_true_trampo);
|
| +#else
|
| + Goto(&return_true);
|
| +#endif
|
| + }
|
| + }
|
| + Bind(&next_outer);
|
| + var_boom.Bind(Int32Constant(2));
|
| + Goto(&outer_loop);
|
| +
|
| +#if ENABLE_TRAMPOLINE_WORKAROUND
|
| + Bind(&return_true_trampo);
|
| + Goto(&return_true);
|
| +#endif
|
| + }
|
| + }
|
| +
|
| + Bind(&return_true);
|
| + Return(BooleanConstant(true));
|
| +
|
| + Bind(&call_runtime);
|
| + TailCallRuntime(Runtime::kSystemBreak, context);
|
| +}
|
| +
|
| void CodeStubAssembler::TryToName(Node* key, Label* if_keyisindex,
|
| Variable* var_index, Label* if_keyisunique,
|
| Label* call_runtime) {
|
|
|