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

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

Issue 2021143003: [builtins] Migrate String.fromCharCode to TurboFan code stub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 | « src/runtime/runtime.h ('k') | test/mjsunit/regress/regress-string-from-char-code-tonumber.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 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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 CONVERT_SMI_ARG_CHECKED(size, 0); 318 CONVERT_SMI_ARG_CHECKED(size, 0);
319 CONVERT_SMI_ARG_CHECKED(flags, 1); 319 CONVERT_SMI_ARG_CHECKED(flags, 1);
320 RUNTIME_ASSERT(IsAligned(size, kPointerSize)); 320 RUNTIME_ASSERT(IsAligned(size, kPointerSize));
321 RUNTIME_ASSERT(size > 0); 321 RUNTIME_ASSERT(size > 0);
322 RUNTIME_ASSERT(size <= Page::kMaxRegularHeapObjectSize); 322 RUNTIME_ASSERT(size <= Page::kMaxRegularHeapObjectSize);
323 bool double_align = AllocateDoubleAlignFlag::decode(flags); 323 bool double_align = AllocateDoubleAlignFlag::decode(flags);
324 AllocationSpace space = AllocateTargetSpace::decode(flags); 324 AllocationSpace space = AllocateTargetSpace::decode(flags);
325 return *isolate->factory()->NewFillerObject(size, double_align, space); 325 return *isolate->factory()->NewFillerObject(size, double_align, space);
326 } 326 }
327 327
328 RUNTIME_FUNCTION(Runtime_AllocateSeqOneByteString) {
329 HandleScope scope(isolate);
330 DCHECK_EQ(1, args.length());
331 CONVERT_SMI_ARG_CHECKED(length, 0);
332 Handle<SeqOneByteString> result;
333 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
334 isolate, result, isolate->factory()->NewRawOneByteString(length));
335 return *result;
336 }
337
338 RUNTIME_FUNCTION(Runtime_AllocateSeqTwoByteString) {
339 HandleScope scope(isolate);
340 DCHECK_EQ(1, args.length());
341 CONVERT_SMI_ARG_CHECKED(length, 0);
342 Handle<SeqTwoByteString> result;
343 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
344 isolate, result, isolate->factory()->NewRawTwoByteString(length));
345 return *result;
346 }
328 347
329 // Collect the raw data for a stack trace. Returns an array of 4 348 // Collect the raw data for a stack trace. Returns an array of 4
330 // element segments each containing a receiver, function, code and 349 // element segments each containing a receiver, function, code and
331 // native code offset. 350 // native code offset.
332 RUNTIME_FUNCTION(Runtime_CollectStackTrace) { 351 RUNTIME_FUNCTION(Runtime_CollectStackTrace) {
333 HandleScope scope(isolate); 352 HandleScope scope(isolate);
334 DCHECK(args.length() == 2); 353 DCHECK(args.length() == 2);
335 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, error_object, 0); 354 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, error_object, 0);
336 CONVERT_ARG_HANDLE_CHECKED(Object, caller, 1); 355 CONVERT_ARG_HANDLE_CHECKED(Object, caller, 1);
337 356
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 HandleScope scope(isolate); 619 HandleScope scope(isolate);
601 DCHECK_EQ(1, args.length()); 620 DCHECK_EQ(1, args.length());
602 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); 621 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
603 bool is_wasm_object = object->IsJSObject() && 622 bool is_wasm_object = object->IsJSObject() &&
604 wasm::IsWasmObject(Handle<JSObject>::cast(object)); 623 wasm::IsWasmObject(Handle<JSObject>::cast(object));
605 return *isolate->factory()->ToBoolean(is_wasm_object); 624 return *isolate->factory()->ToBoolean(is_wasm_object);
606 } 625 }
607 626
608 } // namespace internal 627 } // namespace internal
609 } // namespace v8 628 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/regress/regress-string-from-char-code-tonumber.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698