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

Side by Side Diff: test/cctest/test-api-accessors.cc

Issue 1580323003: Restrict GeneratePreagedPrologue to proper functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix CompilationCacheCachingBehavior for all combinations of --age-code and --optimize-for-size. 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
« no previous file with comments | « test/cctest/heap/test-heap.cc ('k') | test/cctest/test-api-fast-accessor-builder.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 "test/cctest/cctest.h" 5 #include "test/cctest/cctest.h"
6 6
7 #include "include/v8.h" 7 #include "include/v8.h"
8 #include "include/v8-experimental.h" 8 #include "include/v8-experimental.h"
9 9
10 10
(...skipping 10 matching lines...) Expand all
21 21
22 22
23 v8::experimental::FastAccessorBuilder* FastAccessor(v8::Isolate* isolate) { 23 v8::experimental::FastAccessorBuilder* FastAccessor(v8::Isolate* isolate) {
24 auto builder = v8::experimental::FastAccessorBuilder::New(isolate); 24 auto builder = v8::experimental::FastAccessorBuilder::New(isolate);
25 builder->ReturnValue(builder->IntegerConstant(41)); 25 builder->ReturnValue(builder->IntegerConstant(41));
26 return builder; 26 return builder;
27 } 27 }
28 28
29 29
30 TEST(FastAccessors) { 30 TEST(FastAccessors) {
31 if (i::FLAG_always_opt || i::FLAG_optimize_for_size) return; 31 if (i::FLAG_always_opt) return;
32 32
33 v8::Isolate* isolate = CcTest::isolate(); 33 v8::Isolate* isolate = CcTest::isolate();
34 v8::HandleScope scope(isolate); 34 v8::HandleScope scope(isolate);
35 LocalContext env; 35 LocalContext env;
36 36
37 // We emulate Embedder-created DOM Node instances. Specifically: 37 // We emulate Embedder-created DOM Node instances. Specifically:
38 // - 'parent': FunctionTemplate ~= DOM Node superclass 38 // - 'parent': FunctionTemplate ~= DOM Node superclass
39 // - 'child': FunctionTemplate ~= a specific DOM node type, like a <div /> 39 // - 'child': FunctionTemplate ~= a specific DOM node type, like a <div />
40 // 40 //
41 // We'll install both a C++-based and a JS-based accessor on the parent, 41 // We'll install both a C++-based and a JS-based accessor on the parent,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 "var g = Object.getOwnPropertyDescriptor(" 106 "var g = Object.getOwnPropertyDescriptor("
107 " n.__proto__.__proto__, 'firstChildRaw')['get'];" 107 " n.__proto__.__proto__, 'firstChildRaw')['get'];"
108 "try {" 108 "try {"
109 " var f = { firstChildRaw: '51' };" 109 " var f = { firstChildRaw: '51' };"
110 " g.apply(f);" 110 " g.apply(f);"
111 "} catch(e) {" 111 "} catch(e) {"
112 " 31415;" 112 " 31415;"
113 "}", 113 "}",
114 31415); 114 31415);
115 } 115 }
OLDNEW
« no previous file with comments | « test/cctest/heap/test-heap.cc ('k') | test/cctest/test-api-fast-accessor-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698