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

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

Issue 1612323003: Introduce {FAST,SLOW}_STRING_WRAPPER_ELEMENTS (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: one more DCHECK fix Created 4 years, 10 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
« no previous file with comments | « src/runtime/runtime-proxy.cc ('k') | test/cctest/test-inobject-slack-tracking.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/execution.h" 7 #include "src/execution.h"
8 #include "src/handles.h" 8 #include "src/handles.h"
9 #include "src/interpreter/bytecode-array-builder.h" 9 #include "src/interpreter/bytecode-array-builder.h"
10 #include "src/interpreter/interpreter.h" 10 #include "src/interpreter/interpreter.h"
(...skipping 1459 matching lines...) Expand 10 before | Expand all | Expand 10 after
1470 CHECK_EQ(return_value->BooleanValue(), expected_value); 1470 CHECK_EQ(return_value->BooleanValue(), expected_value);
1471 } 1471 }
1472 } 1472 }
1473 1473
1474 1474
1475 TEST(InterpreterTestIn) { 1475 TEST(InterpreterTestIn) {
1476 HandleAndZoneScope handles; 1476 HandleAndZoneScope handles;
1477 i::Factory* factory = handles.main_isolate()->factory(); 1477 i::Factory* factory = handles.main_isolate()->factory();
1478 // Allocate an array 1478 // Allocate an array
1479 Handle<i::JSArray> array = 1479 Handle<i::JSArray> array =
1480 factory->NewJSArray(i::ElementsKind::FAST_SMI_ELEMENTS); 1480 factory->NewJSArray(0, i::ElementsKind::FAST_SMI_ELEMENTS);
1481 // Check for these properties on the array object 1481 // Check for these properties on the array object
1482 const char* properties[] = {"length", "fuzzle", "x", "0"}; 1482 const char* properties[] = {"length", "fuzzle", "x", "0"};
1483 for (size_t i = 0; i < arraysize(properties); i++) { 1483 for (size_t i = 0; i < arraysize(properties); i++) {
1484 bool expected_value = (i == 0); 1484 bool expected_value = (i == 0);
1485 BytecodeArrayBuilder builder(handles.main_isolate(), handles.main_zone()); 1485 BytecodeArrayBuilder builder(handles.main_isolate(), handles.main_zone());
1486 Register r0(0); 1486 Register r0(0);
1487 builder.set_locals_count(1); 1487 builder.set_locals_count(1);
1488 builder.set_context_count(0); 1488 builder.set_context_count(0);
1489 builder.set_parameter_count(0); 1489 builder.set_parameter_count(0);
1490 builder.LoadLiteral(factory->NewStringFromAsciiChecked(properties[i])) 1490 builder.LoadLiteral(factory->NewStringFromAsciiChecked(properties[i]))
(...skipping 2339 matching lines...) Expand 10 before | Expand all | Expand 10 after
3830 Handle<i::Object> return_value = callable().ToHandleChecked(); 3830 Handle<i::Object> return_value = callable().ToHandleChecked();
3831 CHECK(return_value->SameValue(*do_expr[i].second)); 3831 CHECK(return_value->SameValue(*do_expr[i].second));
3832 } 3832 }
3833 3833
3834 FLAG_harmony_do_expressions = old_flag; 3834 FLAG_harmony_do_expressions = old_flag;
3835 } 3835 }
3836 3836
3837 } // namespace interpreter 3837 } // namespace interpreter
3838 } // namespace internal 3838 } // namespace internal
3839 } // namespace v8 3839 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-proxy.cc ('k') | test/cctest/test-inobject-slack-tracking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698