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

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

Issue 1468003002: [Interpreter] Add support for cast operators to bytecode graph builder and (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased the patch and removed unused definitions of matcher classes in unittests Created 5 years 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 // TODO(rmcilroy): Remove this define after this flag is turned on globally 5 // TODO(rmcilroy): Remove this define after this flag is turned on globally
6 #define V8_IMMINENT_DEPRECATION_WARNINGS 6 #define V8_IMMINENT_DEPRECATION_WARNINGS
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 3303 matching lines...) Expand 10 before | Expand all | Expand 10 after
3314 B(CallRuntime), U16(Runtime::kInternalSetPrototype), R(1), U8(2), // 3314 B(CallRuntime), U16(Runtime::kInternalSetPrototype), R(1), U8(2), //
3315 B(Ldar), R(1), // 3315 B(Ldar), R(1), //
3316 B(Return), // 3316 B(Return), //
3317 }, 3317 },
3318 2, 3318 2,
3319 {InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 3319 {InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
3320 InstanceType::FIXED_ARRAY_TYPE}}, 3320 InstanceType::FIXED_ARRAY_TYPE}},
3321 {"var n = 'name'; return { [n]: 'val', get a() { }, set a(b) {} };", 3321 {"var n = 'name'; return { [n]: 'val', get a() { }, set a(b) {} };",
3322 5 * kPointerSize, 3322 5 * kPointerSize,
3323 1, 3323 1,
3324 67, 3324 65,
3325 { 3325 {
3326 B(LdaConstant), U8(0), // 3326 B(LdaConstant), U8(0), //
3327 B(Star), R(0), // 3327 B(Star), R(0), //
3328 B(LdaConstant), U8(1), // 3328 B(LdaConstant), U8(1), //
3329 B(CreateObjectLiteral), U8(0), U8(simple_flags), // 3329 B(CreateObjectLiteral), U8(0), U8(simple_flags), //
3330 B(Star), R(1), // 3330 B(Star), R(1), //
3331 B(Ldar), R(0), // 3331 B(Ldar), R(0), //
3332 B(ToName), // 3332 B(ToName), //
3333 B(Star), R(2), // 3333 B(Star), R(2), //
3334 B(LdaConstant), U8(2), // 3334 B(LdaConstant), U8(2), //
3335 B(Star), R(3), // 3335 B(Star), R(3), //
3336 B(LdaZero), // 3336 B(LdaZero), //
3337 B(Star), R(4), // 3337 B(Star), R(4), //
3338 B(CallRuntime), U16(Runtime::kDefineDataPropertyUnchecked), R(1), // 3338 B(CallRuntime), U16(Runtime::kDefineDataPropertyUnchecked), R(1), //
3339 U8(4), // 3339 U8(4), //
3340 B(LdaConstant), U8(3), // 3340 B(LdaConstant), U8(3), //
3341 B(ToName), //
3342 B(Star), R(2), // 3341 B(Star), R(2), //
3343 B(CreateClosure), U8(4), U8(0), // 3342 B(CreateClosure), U8(4), U8(0), //
3344 B(Star), R(3), // 3343 B(Star), R(3), //
3345 B(LdaZero), // 3344 B(LdaZero), //
3346 B(Star), R(4), // 3345 B(Star), R(4), //
3347 B(CallRuntime), U16(Runtime::kDefineGetterPropertyUnchecked), // 3346 B(CallRuntime), U16(Runtime::kDefineGetterPropertyUnchecked), //
3348 R(1), U8(4), // 3347 R(1), U8(4), //
3349 B(LdaConstant), U8(3), // 3348 B(LdaConstant), U8(3), //
3350 B(ToName), //
3351 B(Star), R(2), // 3349 B(Star), R(2), //
3352 B(CreateClosure), U8(5), U8(0), // 3350 B(CreateClosure), U8(5), U8(0), //
3353 B(Star), R(3), // 3351 B(Star), R(3), //
3354 B(LdaZero), // 3352 B(LdaZero), //
3355 B(Star), R(4), // 3353 B(Star), R(4), //
3356 B(CallRuntime), U16(Runtime::kDefineSetterPropertyUnchecked), // 3354 B(CallRuntime), U16(Runtime::kDefineSetterPropertyUnchecked), //
3357 R(1), U8(4), // 3355 R(1), U8(4), //
3358 B(Ldar), R(1), // 3356 B(Ldar), R(1), //
3359 B(Return), // 3357 B(Return), //
3360 }, 3358 },
(...skipping 2101 matching lines...) Expand 10 before | Expand all | Expand 10 after
5462 for (size_t i = 0; i < arraysize(snippets); i++) { 5460 for (size_t i = 0; i < arraysize(snippets); i++) {
5463 Handle<BytecodeArray> bytecode_array = 5461 Handle<BytecodeArray> bytecode_array =
5464 helper.MakeBytecodeForFunctionBody(snippets[i].code_snippet); 5462 helper.MakeBytecodeForFunctionBody(snippets[i].code_snippet);
5465 CheckBytecodeArrayEqual(snippets[i], bytecode_array); 5463 CheckBytecodeArrayEqual(snippets[i], bytecode_array);
5466 } 5464 }
5467 } 5465 }
5468 5466
5469 } // namespace interpreter 5467 } // namespace interpreter
5470 } // namespace internal 5468 } // namespace internal
5471 } // namespace v8 5469 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698