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

Side by Side Diff: test/unittests/compiler/js-typed-lowering-unittest.cc

Issue 1329293003: [runtime] Sanitize %NewClosure runtime entries. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Ports Created 5 years, 3 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/x87/lithium-x87.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/compiler/access-builder.h" 6 #include "src/compiler/access-builder.h"
7 #include "src/compiler/js-graph.h" 7 #include "src/compiler/js-graph.h"
8 #include "src/compiler/js-operator.h" 8 #include "src/compiler/js-operator.h"
9 #include "src/compiler/js-typed-lowering.h" 9 #include "src/compiler/js-typed-lowering.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 // JSCreateClosure 1031 // JSCreateClosure
1032 1032
1033 1033
1034 TEST_F(JSTypedLoweringTest, JSCreateClosure) { 1034 TEST_F(JSTypedLoweringTest, JSCreateClosure) {
1035 Node* const context = UndefinedConstant(); 1035 Node* const context = UndefinedConstant();
1036 Node* const effect = graph()->start(); 1036 Node* const effect = graph()->start();
1037 Node* const control = graph()->start(); 1037 Node* const control = graph()->start();
1038 Handle<SharedFunctionInfo> shared(isolate()->object_function()->shared()); 1038 Handle<SharedFunctionInfo> shared(isolate()->object_function()->shared());
1039 Reduction r = 1039 Reduction r =
1040 Reduce(graph()->NewNode(javascript()->CreateClosure(shared, NOT_TENURED), 1040 Reduce(graph()->NewNode(javascript()->CreateClosure(shared, NOT_TENURED),
1041 context, context, effect, control)); 1041 context, effect, control));
1042 ASSERT_TRUE(r.Changed()); 1042 ASSERT_TRUE(r.Changed());
1043 EXPECT_THAT(r.replacement(), 1043 EXPECT_THAT(r.replacement(),
1044 IsCall(_, IsHeapConstant(CodeFactory::FastNewClosure( 1044 IsCall(_, IsHeapConstant(CodeFactory::FastNewClosure(
1045 isolate(), shared->language_mode(), 1045 isolate(), shared->language_mode(),
1046 shared->kind()).code()), 1046 shared->kind()).code()),
1047 IsHeapConstant(shared), effect, control)); 1047 IsHeapConstant(shared), effect, control));
1048 } 1048 }
1049 1049
1050 1050
1051 // ----------------------------------------------------------------------------- 1051 // -----------------------------------------------------------------------------
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 EXPECT_THAT(r.replacement(), 1115 EXPECT_THAT(r.replacement(),
1116 IsFinish(IsAllocate(IsNumberConstant(Context::SizeFor( 1116 IsFinish(IsAllocate(IsNumberConstant(Context::SizeFor(
1117 Context::MIN_CONTEXT_SLOTS)), 1117 Context::MIN_CONTEXT_SLOTS)),
1118 effect, control), 1118 effect, control),
1119 _)); 1119 _));
1120 } 1120 }
1121 1121
1122 } // namespace compiler 1122 } // namespace compiler
1123 } // namespace internal 1123 } // namespace internal
1124 } // namespace v8 1124 } // namespace v8
OLDNEW
« no previous file with comments | « src/x87/lithium-x87.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698