| Index: test/cctest/interpreter/test-bytecode-generator.cc
|
| diff --git a/test/cctest/interpreter/test-bytecode-generator.cc b/test/cctest/interpreter/test-bytecode-generator.cc
|
| index 9dcfb5b01960a2dea91ef138c850da3b94d64f1e..f9756421f6bfe400a43882a7ddb3d3c8b50e75f8 100644
|
| --- a/test/cctest/interpreter/test-bytecode-generator.cc
|
| +++ b/test/cctest/interpreter/test-bytecode-generator.cc
|
| @@ -1073,17 +1073,17 @@ TEST(StoreGlobal) {
|
| InitializedHandleScope handle_scope;
|
| BytecodeGeneratorHelper helper;
|
|
|
| - ExpectedSnippet<int> snippets[] = {
|
| + ExpectedSnippet<InstanceType> snippets[] = {
|
| {
|
| "var a = 1;\nfunction f() { a = 2; }\nf()",
|
| 0,
|
| 1,
|
| 6,
|
| {
|
| - B(LdaSmi8), U8(2), //
|
| - B(StaGlobal), _, //
|
| - B(LdaUndefined), //
|
| - B(Return) //
|
| + B(LdaSmi8), U8(2), //
|
| + B(StaGlobalSloppy), _, //
|
| + B(LdaUndefined), //
|
| + B(Return) //
|
| },
|
| },
|
| {
|
| @@ -1093,11 +1093,23 @@ TEST(StoreGlobal) {
|
| 6,
|
| {
|
| B(Ldar), R(helper.kLastParamIndex), //
|
| - B(StaGlobal), _, //
|
| + B(StaGlobalSloppy), _, //
|
| B(LdaUndefined), //
|
| B(Return) //
|
| },
|
| },
|
| + {
|
| + "'use strict'; var a = 1;\nfunction f() { a = 2; }\nf()",
|
| + 0,
|
| + 1,
|
| + 6,
|
| + {
|
| + B(LdaSmi8), U8(2), //
|
| + B(StaGlobalStrict), _, //
|
| + B(LdaUndefined), //
|
| + B(Return) //
|
| + },
|
| + },
|
| };
|
|
|
| for (size_t i = 0; i < arraysize(snippets); i++) {
|
| @@ -1566,7 +1578,7 @@ TEST(DeclareGlobals) {
|
| B(CallRuntime), U16(Runtime::kInitializeVarGlobal), R(2), //
|
| U8(3), //
|
| B(LdaSmi8), U8(2), //
|
| - B(StaGlobal), _, //
|
| + B(StaGlobalSloppy), _, //
|
| B(Star), R(0), //
|
| B(Ldar), R(0), //
|
| B(Return) //
|
|
|