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

Side by Side Diff: src/runtime.cc

Issue 22562002: Convert FastNewClosureStub into hydrogen. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Nit fixin Created 7 years, 3 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/x64/code-stubs-x64.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 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 7933 matching lines...) Expand 10 before | Expand all | Expand 10 after
7944 WriteBarrierMode mode = array->GetWriteBarrierMode(no_gc); 7944 WriteBarrierMode mode = array->GetWriteBarrierMode(no_gc);
7945 for (int i = 0; i < length; i++) { 7945 for (int i = 0; i < length; i++) {
7946 array->set(i, *--parameters, mode); 7946 array->set(i, *--parameters, mode);
7947 } 7947 }
7948 JSObject::cast(result)->set_elements(FixedArray::cast(obj)); 7948 JSObject::cast(result)->set_elements(FixedArray::cast(obj));
7949 } 7949 }
7950 return result; 7950 return result;
7951 } 7951 }
7952 7952
7953 7953
7954 RUNTIME_FUNCTION(MaybeObject*, Runtime_NewClosureFromStubFailure) {
7955 HandleScope scope(isolate);
7956 ASSERT(args.length() == 1);
7957 CONVERT_ARG_HANDLE_CHECKED(SharedFunctionInfo, shared, 0);
7958 Handle<Context> context(isolate->context());
7959 PretenureFlag pretenure_flag = NOT_TENURED;
7960 Handle<JSFunction> result =
7961 isolate->factory()->NewFunctionFromSharedFunctionInfo(shared,
7962 context,
7963 pretenure_flag);
7964 return *result;
7965 }
7966
7967
7954 RUNTIME_FUNCTION(MaybeObject*, Runtime_NewClosure) { 7968 RUNTIME_FUNCTION(MaybeObject*, Runtime_NewClosure) {
7955 HandleScope scope(isolate); 7969 HandleScope scope(isolate);
7956 ASSERT(args.length() == 3); 7970 ASSERT(args.length() == 3);
7957 CONVERT_ARG_HANDLE_CHECKED(Context, context, 0); 7971 CONVERT_ARG_HANDLE_CHECKED(Context, context, 0);
7958 CONVERT_ARG_HANDLE_CHECKED(SharedFunctionInfo, shared, 1); 7972 CONVERT_ARG_HANDLE_CHECKED(SharedFunctionInfo, shared, 1);
7959 CONVERT_BOOLEAN_ARG_CHECKED(pretenure, 2); 7973 CONVERT_BOOLEAN_ARG_CHECKED(pretenure, 2);
7960 7974
7961 // The caller ensures that we pretenure closures that are assigned 7975 // The caller ensures that we pretenure closures that are assigned
7962 // directly to properties. 7976 // directly to properties.
7963 PretenureFlag pretenure_flag = pretenure ? TENURED : NOT_TENURED; 7977 PretenureFlag pretenure_flag = pretenure ? TENURED : NOT_TENURED;
(...skipping 6709 matching lines...) Expand 10 before | Expand all | Expand 10 after
14673 // Handle last resort GC and make sure to allow future allocations 14687 // Handle last resort GC and make sure to allow future allocations
14674 // to grow the heap without causing GCs (if possible). 14688 // to grow the heap without causing GCs (if possible).
14675 isolate->counters()->gc_last_resort_from_js()->Increment(); 14689 isolate->counters()->gc_last_resort_from_js()->Increment();
14676 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 14690 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
14677 "Runtime::PerformGC"); 14691 "Runtime::PerformGC");
14678 } 14692 }
14679 } 14693 }
14680 14694
14681 14695
14682 } } // namespace v8::internal 14696 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698