Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
| 8 #include "src/interpreter/bytecode-array-builder.h" | 8 #include "src/interpreter/bytecode-array-builder.h" |
| 9 #include "src/interpreter/bytecode-array-iterator.h" | 9 #include "src/interpreter/bytecode-array-iterator.h" |
| 10 #include "src/interpreter/bytecode-jump-table.h" | 10 #include "src/interpreter/bytecode-jump-table.h" |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 364 builder.CallRuntime(Runtime::kInlineIsArray, reg_list); | 364 builder.CallRuntime(Runtime::kInlineIsArray, reg_list); |
| 365 | 365 |
| 366 // Emit debugger bytecode. | 366 // Emit debugger bytecode. |
| 367 builder.Debugger(); | 367 builder.Debugger(); |
| 368 | 368 |
| 369 // Insert dummy ops to force longer jumps. | 369 // Insert dummy ops to force longer jumps. |
| 370 for (int i = 0; i < 256; i++) { | 370 for (int i = 0; i < 256; i++) { |
| 371 builder.Debugger(); | 371 builder.Debugger(); |
| 372 } | 372 } |
| 373 | 373 |
| 374 // Emit block counter increments. | |
| 375 FLAG_block_coverage = true; // Satisfy DCHECKs. | |
|
rmcilroy
2017/06/01 14:01:50
This will unconditionally set the flag for all fol
jgruber
2017/06/02 06:39:27
Done.
| |
| 376 builder.IncBlockCounter(0); | |
| 377 | |
| 374 // Bind labels for long jumps at the very end. | 378 // Bind labels for long jumps at the very end. |
| 375 for (size_t i = 0; i < arraysize(end); i++) { | 379 for (size_t i = 0; i < arraysize(end); i++) { |
| 376 builder.Bind(&end[i]); | 380 builder.Bind(&end[i]); |
| 377 } | 381 } |
| 378 | 382 |
| 379 // Return must be the last instruction. | 383 // Return must be the last instruction. |
| 380 builder.Return(); | 384 builder.Return(); |
| 381 | 385 |
| 382 // Generate BytecodeArray. | 386 // Generate BytecodeArray. |
| 383 scope.SetScriptScopeInfo(factory->NewScopeInfo(1)); | 387 scope.SetScriptScopeInfo(factory->NewScopeInfo(1)); |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 828 iterator.Advance(); | 832 iterator.Advance(); |
| 829 } | 833 } |
| 830 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); | 834 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); |
| 831 iterator.Advance(); | 835 iterator.Advance(); |
| 832 CHECK(iterator.done()); | 836 CHECK(iterator.done()); |
| 833 } | 837 } |
| 834 | 838 |
| 835 } // namespace interpreter | 839 } // namespace interpreter |
| 836 } // namespace internal | 840 } // namespace internal |
| 837 } // namespace v8 | 841 } // namespace v8 |
| OLD | NEW |