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

Side by Side Diff: src/generator.js

Issue 582093002: Revert "filter cross context eval" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/runtime.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 "use strict"; 5 "use strict";
6 6
7 // This file relies on the fact that the following declarations have been made 7 // This file relies on the fact that the following declarations have been made
8 // in runtime.js: 8 // in runtime.js:
9 // var $Function = global.Function; 9 // var $Function = global.Function;
10 10
(...skipping 30 matching lines...) Expand all
41 if (%_IsConstructCall()) { 41 if (%_IsConstructCall()) {
42 throw MakeTypeError('not_constructor', ['GeneratorFunctionPrototype']); 42 throw MakeTypeError('not_constructor', ['GeneratorFunctionPrototype']);
43 } 43 }
44 } 44 }
45 45
46 function GeneratorFunctionConstructor(arg1) { // length == 1 46 function GeneratorFunctionConstructor(arg1) { // length == 1
47 var source = NewFunctionString(arguments, 'function*'); 47 var source = NewFunctionString(arguments, 'function*');
48 var global_proxy = %GlobalProxy(global); 48 var global_proxy = %GlobalProxy(global);
49 // Compile the string in the constructor and not a helper so that errors 49 // Compile the string in the constructor and not a helper so that errors
50 // appear to come from here. 50 // appear to come from here.
51 var f = %CompileString(source, true); 51 var f = %_CallFunction(global_proxy, %CompileString(source, true));
52 if (!IS_FUNCTION(f)) return f;
53 f = %_CallFunction(global_proxy, f);
54 %FunctionMarkNameShouldPrintAsAnonymous(f); 52 %FunctionMarkNameShouldPrintAsAnonymous(f);
55 return f; 53 return f;
56 } 54 }
57 55
58 56
59 function SetUpGenerators() { 57 function SetUpGenerators() {
60 %CheckIsBootstrapping(); 58 %CheckIsBootstrapping();
61 59
62 // Both Runtime_GeneratorNext and Runtime_GeneratorThrow are supported by 60 // Both Runtime_GeneratorNext and Runtime_GeneratorThrow are supported by
63 // neither Crankshaft nor TurboFan, disable optimization of wrappers here. 61 // neither Crankshaft nor TurboFan, disable optimization of wrappers here.
(...skipping 14 matching lines...) Expand all
78 GeneratorFunctionPrototype, DONT_ENUM | DONT_DELETE | READ_ONLY); 76 GeneratorFunctionPrototype, DONT_ENUM | DONT_DELETE | READ_ONLY);
79 %InternalSetPrototype(GeneratorFunctionPrototype, $Function.prototype); 77 %InternalSetPrototype(GeneratorFunctionPrototype, $Function.prototype);
80 %SetCode(GeneratorFunctionPrototype, GeneratorFunctionPrototypeConstructor); 78 %SetCode(GeneratorFunctionPrototype, GeneratorFunctionPrototypeConstructor);
81 %AddNamedProperty(GeneratorFunctionPrototype, "constructor", 79 %AddNamedProperty(GeneratorFunctionPrototype, "constructor",
82 GeneratorFunction, DONT_ENUM | DONT_DELETE | READ_ONLY); 80 GeneratorFunction, DONT_ENUM | DONT_DELETE | READ_ONLY);
83 %InternalSetPrototype(GeneratorFunction, $Function); 81 %InternalSetPrototype(GeneratorFunction, $Function);
84 %SetCode(GeneratorFunction, GeneratorFunctionConstructor); 82 %SetCode(GeneratorFunction, GeneratorFunctionConstructor);
85 } 83 }
86 84
87 SetUpGenerators(); 85 SetUpGenerators();
OLDNEW
« no previous file with comments | « no previous file | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698