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

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

Issue 1865833002: [generators] Decouple generator resume from fullcodegen. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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
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 "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/ast/prettyprinter.h" 8 #include "src/ast/prettyprinter.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 } 153 }
154 154
155 155
156 RUNTIME_FUNCTION(Runtime_ThrowIllegalInvocation) { 156 RUNTIME_FUNCTION(Runtime_ThrowIllegalInvocation) {
157 HandleScope scope(isolate); 157 HandleScope scope(isolate);
158 DCHECK(args.length() == 0); 158 DCHECK(args.length() == 0);
159 THROW_NEW_ERROR_RETURN_FAILURE( 159 THROW_NEW_ERROR_RETURN_FAILURE(
160 isolate, NewTypeError(MessageTemplate::kIllegalInvocation)); 160 isolate, NewTypeError(MessageTemplate::kIllegalInvocation));
161 } 161 }
162 162
163 RUNTIME_FUNCTION(Runtime_ThrowIncompatibleMethodReceiver) {
164 HandleScope scope(isolate);
165 DCHECK_EQ(2, args.length());
166 CONVERT_ARG_HANDLE_CHECKED(Object, arg0, 0);
167 CONVERT_ARG_HANDLE_CHECKED(Object, arg1, 1);
168 THROW_NEW_ERROR_RETURN_FAILURE(
169 isolate,
170 NewTypeError(MessageTemplate::kIncompatibleMethodReceiver, arg0, arg1));
171 }
163 172
164 RUNTIME_FUNCTION(Runtime_ThrowIteratorResultNotAnObject) { 173 RUNTIME_FUNCTION(Runtime_ThrowIteratorResultNotAnObject) {
165 HandleScope scope(isolate); 174 HandleScope scope(isolate);
166 DCHECK(args.length() == 1); 175 DCHECK(args.length() == 1);
167 CONVERT_ARG_HANDLE_CHECKED(Object, value, 0); 176 CONVERT_ARG_HANDLE_CHECKED(Object, value, 0);
168 THROW_NEW_ERROR_RETURN_FAILURE( 177 THROW_NEW_ERROR_RETURN_FAILURE(
169 isolate, 178 isolate,
170 NewTypeError(MessageTemplate::kIteratorResultNotAnObject, value)); 179 NewTypeError(MessageTemplate::kIteratorResultNotAnObject, value));
171 } 180 }
172 181
182 RUNTIME_FUNCTION(Runtime_ThrowGeneratorRunning) {
183 HandleScope scope(isolate);
184 DCHECK_EQ(0, args.length());
185 THROW_NEW_ERROR_RETURN_FAILURE(
186 isolate, NewTypeError(MessageTemplate::kGeneratorRunning));
187 }
173 188
174 RUNTIME_FUNCTION(Runtime_ThrowApplyNonFunction) { 189 RUNTIME_FUNCTION(Runtime_ThrowApplyNonFunction) {
175 HandleScope scope(isolate); 190 HandleScope scope(isolate);
176 DCHECK_EQ(1, args.length()); 191 DCHECK_EQ(1, args.length());
177 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); 192 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
178 Handle<String> type = Object::TypeOf(isolate, object); 193 Handle<String> type = Object::TypeOf(isolate, object);
179 THROW_NEW_ERROR_RETURN_FAILURE( 194 THROW_NEW_ERROR_RETURN_FAILURE(
180 isolate, NewTypeError(MessageTemplate::kApplyNonFunction, object, type)); 195 isolate, NewTypeError(MessageTemplate::kApplyNonFunction, object, type));
181 } 196 }
182 197
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 std::stringstream stats_stream; 484 std::stringstream stats_stream;
470 isolate->counters()->runtime_call_stats()->Print(stats_stream); 485 isolate->counters()->runtime_call_stats()->Print(stats_stream);
471 Handle<String> result = 486 Handle<String> result =
472 isolate->factory()->NewStringFromAsciiChecked(stats_stream.str().c_str()); 487 isolate->factory()->NewStringFromAsciiChecked(stats_stream.str().c_str());
473 isolate->counters()->runtime_call_stats()->Reset(); 488 isolate->counters()->runtime_call_stats()->Reset();
474 return *result; 489 return *result;
475 } 490 }
476 491
477 } // namespace internal 492 } // namespace internal
478 } // namespace v8 493 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698