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

Side by Side Diff: src/runtime/runtime-internal.cc

Issue 2539093002: [runtime] Port simple String.prototype.indexOf cases to TF Builtin (Closed)
Patch Set: merging with master 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 | « src/runtime/runtime-function.cc ('k') | src/runtime/runtime-object.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 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/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/ast/prettyprinter.h" 10 #include "src/ast/prettyprinter.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 DCHECK_LE(0, args.length()); 99 DCHECK_LE(0, args.length());
100 return isolate->StackOverflow(); 100 return isolate->StackOverflow();
101 } 101 }
102 102
103 RUNTIME_FUNCTION(Runtime_ThrowTypeError) { 103 RUNTIME_FUNCTION(Runtime_ThrowTypeError) {
104 HandleScope scope(isolate); 104 HandleScope scope(isolate);
105 DCHECK_LE(1, args.length()); 105 DCHECK_LE(1, args.length());
106 CONVERT_SMI_ARG_CHECKED(message_id_smi, 0); 106 CONVERT_SMI_ARG_CHECKED(message_id_smi, 0);
107 107
108 Handle<Object> undefined = isolate->factory()->undefined_value(); 108 Handle<Object> undefined = isolate->factory()->undefined_value();
109 Handle<Object> arg0 = (args.length() > 1) ? args.at<Object>(1) : undefined; 109 Handle<Object> arg0 = (args.length() > 1) ? args.at(1) : undefined;
110 Handle<Object> arg1 = (args.length() > 2) ? args.at<Object>(2) : undefined; 110 Handle<Object> arg1 = (args.length() > 2) ? args.at(2) : undefined;
111 Handle<Object> arg2 = (args.length() > 3) ? args.at<Object>(3) : undefined; 111 Handle<Object> arg2 = (args.length() > 3) ? args.at(3) : undefined;
112 112
113 MessageTemplate::Template message_id = 113 MessageTemplate::Template message_id =
114 static_cast<MessageTemplate::Template>(message_id_smi); 114 static_cast<MessageTemplate::Template>(message_id_smi);
115 115
116 THROW_NEW_ERROR_RETURN_FAILURE(isolate, 116 THROW_NEW_ERROR_RETURN_FAILURE(isolate,
117 NewTypeError(message_id, arg0, arg1, arg2)); 117 NewTypeError(message_id, arg0, arg1, arg2));
118 } 118 }
119 119
120 RUNTIME_FUNCTION(Runtime_UnwindAndFindExceptionHandler) { 120 RUNTIME_FUNCTION(Runtime_UnwindAndFindExceptionHandler) {
121 SealHandleScope shs(isolate); 121 SealHandleScope shs(isolate);
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 479
480 RUNTIME_FUNCTION(Runtime_Typeof) { 480 RUNTIME_FUNCTION(Runtime_Typeof) {
481 HandleScope scope(isolate); 481 HandleScope scope(isolate);
482 DCHECK_EQ(1, args.length()); 482 DCHECK_EQ(1, args.length());
483 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); 483 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
484 return *Object::TypeOf(isolate, object); 484 return *Object::TypeOf(isolate, object);
485 } 485 }
486 486
487 } // namespace internal 487 } // namespace internal
488 } // namespace v8 488 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-function.cc ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698