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

Side by Side Diff: src/builtins/builtins-function.cc

Issue 2533463002: Fix 'combo breaker' in CreateDynamicFunction to handle template literals. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | test/mjsunit/regress-crbug-663410.js » ('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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/builtins/builtins.h" 5 #include "src/builtins/builtins.h"
6 #include "src/builtins/builtins-utils.h" 6 #include "src/builtins/builtins-utils.h"
7 7
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/string-builder.h" 9 #include "src/string-builder.h"
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 for (int i = 0, length = param->length(); i < length; ++i) { 54 for (int i = 0, length = param->length(); i < length; ++i) {
55 if (param_content.Get(i) == ')') { 55 if (param_content.Get(i) == ')') {
56 parenthesis_in_arg_string = true; 56 parenthesis_in_arg_string = true;
57 break; 57 break;
58 } 58 }
59 } 59 }
60 } 60 }
61 // If the formal parameters include an unbalanced block comment, the 61 // If the formal parameters include an unbalanced block comment, the
62 // function must be rejected. Since JavaScript does not allow nested 62 // function must be rejected. Since JavaScript does not allow nested
63 // comments we can include a trailing block comment to catch this. 63 // comments we can include a trailing block comment to catch this.
64 builder.AppendCString("\n/**/"); 64 builder.AppendCString("\n/*``*/");
65 } 65 }
66 builder.AppendCString(") {\n"); 66 builder.AppendCString(") {\n");
67 if (argc > 0) { 67 if (argc > 0) {
68 Handle<String> body; 68 Handle<String> body;
69 ASSIGN_RETURN_ON_EXCEPTION( 69 ASSIGN_RETURN_ON_EXCEPTION(
70 isolate, body, Object::ToString(isolate, args.at<Object>(argc)), 70 isolate, body, Object::ToString(isolate, args.at<Object>(argc)),
71 Object); 71 Object);
72 builder.AppendString(body); 72 builder.AppendString(body);
73 } 73 }
74 builder.AppendCString("\n})"); 74 builder.AppendCString("\n})");
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 289
290 Node* f = assembler.Parameter(0); 290 Node* f = assembler.Parameter(0);
291 Node* v = assembler.Parameter(1); 291 Node* v = assembler.Parameter(1);
292 Node* context = assembler.Parameter(4); 292 Node* context = assembler.Parameter(4);
293 Node* result = assembler.OrdinaryHasInstance(context, f, v); 293 Node* result = assembler.OrdinaryHasInstance(context, f, v);
294 assembler.Return(result); 294 assembler.Return(result);
295 } 295 }
296 296
297 } // namespace internal 297 } // namespace internal
298 } // namespace v8 298 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress-crbug-663410.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698