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

Side by Side Diff: test/cctest/interpreter/test-bytecode-generator.cc

Issue 1571873004: Ship ES2015 sloppy-mode const semantics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: More test failures noted Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 #include "src/interpreter/bytecode-array-iterator.h" 8 #include "src/interpreter/bytecode-array-iterator.h"
9 #include "src/interpreter/bytecode-generator.h" 9 #include "src/interpreter/bytecode-generator.h"
10 #include "src/interpreter/interpreter.h" 10 #include "src/interpreter/interpreter.h"
(...skipping 10 matching lines...) Expand all
21 21
22 static const int kLastParamIndex = 22 static const int kLastParamIndex =
23 -InterpreterFrameConstants::kLastParamFromRegisterPointer / kPointerSize; 23 -InterpreterFrameConstants::kLastParamFromRegisterPointer / kPointerSize;
24 24
25 BytecodeGeneratorHelper() { 25 BytecodeGeneratorHelper() {
26 i::FLAG_ignition = true; 26 i::FLAG_ignition = true;
27 i::FLAG_ignition_fake_try_catch = true; 27 i::FLAG_ignition_fake_try_catch = true;
28 i::FLAG_ignition_filter = StrDup(kFunctionName); 28 i::FLAG_ignition_filter = StrDup(kFunctionName);
29 i::FLAG_always_opt = false; 29 i::FLAG_always_opt = false;
30 i::FLAG_allow_natives_syntax = true; 30 i::FLAG_allow_natives_syntax = true;
31 i::FLAG_legacy_const = true;
31 CcTest::i_isolate()->interpreter()->Initialize(); 32 CcTest::i_isolate()->interpreter()->Initialize();
32 } 33 }
33 34
34 Isolate* isolate() { return CcTest::i_isolate(); } 35 Isolate* isolate() { return CcTest::i_isolate(); }
35 Factory* factory() { return CcTest::i_isolate()->factory(); } 36 Factory* factory() { return CcTest::i_isolate()->factory(); }
36 37
37 Handle<BytecodeArray> MakeTopLevelBytecode(const char* source) { 38 Handle<BytecodeArray> MakeTopLevelBytecode(const char* source) {
38 const char* old_ignition_filter = i::FLAG_ignition_filter; 39 const char* old_ignition_filter = i::FLAG_ignition_filter;
39 i::FLAG_ignition_filter = "*"; 40 i::FLAG_ignition_filter = "*";
40 Local<v8::Script> script = v8_compile(source); 41 Local<v8::Script> script = v8_compile(source);
(...skipping 6027 matching lines...) Expand 10 before | Expand all | Expand 10 after
6068 std::string(function_epilogue); 6069 std::string(function_epilogue);
6069 Handle<BytecodeArray> bytecode_array = 6070 Handle<BytecodeArray> bytecode_array =
6070 helper.MakeBytecode(script.c_str(), "t", "f"); 6071 helper.MakeBytecode(script.c_str(), "t", "f");
6071 CheckBytecodeArrayEqual(snippets[i], bytecode_array); 6072 CheckBytecodeArrayEqual(snippets[i], bytecode_array);
6072 } 6073 }
6073 } 6074 }
6074 6075
6075 } // namespace interpreter 6076 } // namespace interpreter
6076 } // namespace internal 6077 } // namespace internal
6077 } // namespace v8 6078 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698