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

Side by Side Diff: src/runtime.cc

Issue 148343005: A64: Synchronize with r18147. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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 | « src/runtime.h ('k') | src/stub-cache.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2645 matching lines...) Expand 10 before | Expand all | Expand 10 after
2656 InstallBuiltin(isolate, holder, "shift", Builtins::kArrayShift); 2656 InstallBuiltin(isolate, holder, "shift", Builtins::kArrayShift);
2657 InstallBuiltin(isolate, holder, "unshift", Builtins::kArrayUnshift); 2657 InstallBuiltin(isolate, holder, "unshift", Builtins::kArrayUnshift);
2658 InstallBuiltin(isolate, holder, "slice", Builtins::kArraySlice); 2658 InstallBuiltin(isolate, holder, "slice", Builtins::kArraySlice);
2659 InstallBuiltin(isolate, holder, "splice", Builtins::kArraySplice); 2659 InstallBuiltin(isolate, holder, "splice", Builtins::kArraySplice);
2660 InstallBuiltin(isolate, holder, "concat", Builtins::kArrayConcat); 2660 InstallBuiltin(isolate, holder, "concat", Builtins::kArrayConcat);
2661 2661
2662 return *holder; 2662 return *holder;
2663 } 2663 }
2664 2664
2665 2665
2666 RUNTIME_FUNCTION(MaybeObject*, Runtime_IsCallable) {
2667 SealHandleScope shs(isolate);
2668 ASSERT(args.length() == 1);
2669 CONVERT_ARG_CHECKED(Object, obj, 0);
2670 return isolate->heap()->ToBoolean(obj->IsCallable());
2671 }
2672
2673
2666 RUNTIME_FUNCTION(MaybeObject*, Runtime_IsClassicModeFunction) { 2674 RUNTIME_FUNCTION(MaybeObject*, Runtime_IsClassicModeFunction) {
2667 SealHandleScope shs(isolate); 2675 SealHandleScope shs(isolate);
2668 ASSERT(args.length() == 1); 2676 ASSERT(args.length() == 1);
2669 CONVERT_ARG_CHECKED(JSReceiver, callable, 0); 2677 CONVERT_ARG_CHECKED(JSReceiver, callable, 0);
2670 if (!callable->IsJSFunction()) { 2678 if (!callable->IsJSFunction()) {
2671 HandleScope scope(isolate); 2679 HandleScope scope(isolate);
2672 bool threw = false; 2680 bool threw = false;
2673 Handle<Object> delegate = Execution::TryGetFunctionDelegate( 2681 Handle<Object> delegate = Execution::TryGetFunctionDelegate(
2674 isolate, Handle<JSReceiver>(callable), &threw); 2682 isolate, Handle<JSReceiver>(callable), &threw);
2675 if (threw) return Failure::Exception(); 2683 if (threw) return Failure::Exception();
(...skipping 11640 matching lines...) Expand 10 before | Expand all | Expand 10 after
14316 ASSERT(args.length() == 2); 14324 ASSERT(args.length() == 2);
14317 OS::PrintError("abort: %s\n", 14325 OS::PrintError("abort: %s\n",
14318 reinterpret_cast<char*>(args[0]) + args.smi_at(1)); 14326 reinterpret_cast<char*>(args[0]) + args.smi_at(1));
14319 isolate->PrintStack(stderr); 14327 isolate->PrintStack(stderr);
14320 OS::Abort(); 14328 OS::Abort();
14321 UNREACHABLE(); 14329 UNREACHABLE();
14322 return NULL; 14330 return NULL;
14323 } 14331 }
14324 14332
14325 14333
14334 RUNTIME_FUNCTION(MaybeObject*, Runtime_AbortJS) {
14335 HandleScope scope(isolate);
14336 ASSERT(args.length() == 1);
14337 CONVERT_ARG_HANDLE_CHECKED(String, message, 0);
14338 OS::PrintError("abort: %s\n", *message->ToCString());
14339 isolate->PrintStack(stderr);
14340 OS::Abort();
14341 UNREACHABLE();
14342 return NULL;
14343 }
14344
14345
14326 RUNTIME_FUNCTION(MaybeObject*, Runtime_FlattenString) { 14346 RUNTIME_FUNCTION(MaybeObject*, Runtime_FlattenString) {
14327 HandleScope scope(isolate); 14347 HandleScope scope(isolate);
14328 ASSERT(args.length() == 1); 14348 ASSERT(args.length() == 1);
14329 CONVERT_ARG_HANDLE_CHECKED(String, str, 0); 14349 CONVERT_ARG_HANDLE_CHECKED(String, str, 0);
14330 FlattenString(str); 14350 FlattenString(str);
14331 return isolate->heap()->undefined_value(); 14351 return isolate->heap()->undefined_value();
14332 } 14352 }
14333 14353
14334 14354
14335 RUNTIME_FUNCTION(MaybeObject*, Runtime_NotifyContextDisposed) { 14355 RUNTIME_FUNCTION(MaybeObject*, Runtime_NotifyContextDisposed) {
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
14608 return isolate->heap()->undefined_value(); 14628 return isolate->heap()->undefined_value();
14609 14629
14610 ASSERT(!(obj->map()->is_observed() && obj->IsJSObject() && 14630 ASSERT(!(obj->map()->is_observed() && obj->IsJSObject() &&
14611 Handle<JSObject>::cast(obj)->HasFastElements())); 14631 Handle<JSObject>::cast(obj)->HasFastElements()));
14612 ASSERT(obj->IsJSObject()); 14632 ASSERT(obj->IsJSObject());
14613 JSObject::SetObserved(Handle<JSObject>::cast(obj)); 14633 JSObject::SetObserved(Handle<JSObject>::cast(obj));
14614 return isolate->heap()->undefined_value(); 14634 return isolate->heap()->undefined_value();
14615 } 14635 }
14616 14636
14617 14637
14618 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetObserverDeliveryPending) { 14638 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetMicrotaskPending) {
14619 SealHandleScope shs(isolate); 14639 SealHandleScope shs(isolate);
14620 ASSERT(args.length() == 0); 14640 ASSERT(args.length() == 1);
14621 isolate->set_observer_delivery_pending(true); 14641 CONVERT_BOOLEAN_ARG_CHECKED(new_state, 0);
14622 return isolate->heap()->undefined_value(); 14642 bool old_state = isolate->microtask_pending();
14643 isolate->set_microtask_pending(new_state);
14644 return isolate->heap()->ToBoolean(old_state);
14623 } 14645 }
14624 14646
14625 14647
14626 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetObservationState) { 14648 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetObservationState) {
14627 SealHandleScope shs(isolate); 14649 SealHandleScope shs(isolate);
14628 ASSERT(args.length() == 0); 14650 ASSERT(args.length() == 0);
14629 return isolate->heap()->observation_state(); 14651 return isolate->heap()->observation_state();
14630 } 14652 }
14631 14653
14632 14654
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
14893 // Handle last resort GC and make sure to allow future allocations 14915 // Handle last resort GC and make sure to allow future allocations
14894 // to grow the heap without causing GCs (if possible). 14916 // to grow the heap without causing GCs (if possible).
14895 isolate->counters()->gc_last_resort_from_js()->Increment(); 14917 isolate->counters()->gc_last_resort_from_js()->Increment();
14896 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 14918 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
14897 "Runtime::PerformGC"); 14919 "Runtime::PerformGC");
14898 } 14920 }
14899 } 14921 }
14900 14922
14901 14923
14902 } } // namespace v8::internal 14924 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.h ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698