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

Side by Side Diff: src/api.cc

Issue 6685052: Version 3.2.2. Fixed a number of crash and correctness bugs. Improved Cranksh... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 9 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 | « samples/shell.cc ('k') | src/arm/assembler-arm.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 3562 matching lines...) Expand 10 before | Expand all | Expand 10 after
3573 void Context::ReattachGlobal(Handle<Object> global_object) { 3573 void Context::ReattachGlobal(Handle<Object> global_object) {
3574 if (IsDeadCheck("v8::Context::ReattachGlobal()")) return; 3574 if (IsDeadCheck("v8::Context::ReattachGlobal()")) return;
3575 ENTER_V8; 3575 ENTER_V8;
3576 i::Object** ctx = reinterpret_cast<i::Object**>(this); 3576 i::Object** ctx = reinterpret_cast<i::Object**>(this);
3577 i::Handle<i::Context> context = 3577 i::Handle<i::Context> context =
3578 i::Handle<i::Context>::cast(i::Handle<i::Object>(ctx)); 3578 i::Handle<i::Context>::cast(i::Handle<i::Object>(ctx));
3579 i::Bootstrapper::ReattachGlobal(context, Utils::OpenHandle(*global_object)); 3579 i::Bootstrapper::ReattachGlobal(context, Utils::OpenHandle(*global_object));
3580 } 3580 }
3581 3581
3582 3582
3583 void V8::SetWrapperClassId(i::Object** global_handle, uint16_t class_id) {
3584 i::GlobalHandles::SetWrapperClassId(global_handle, class_id);
3585 }
3586
3587
3583 Local<v8::Object> ObjectTemplate::NewInstance() { 3588 Local<v8::Object> ObjectTemplate::NewInstance() {
3584 ON_BAILOUT("v8::ObjectTemplate::NewInstance()", return Local<v8::Object>()); 3589 ON_BAILOUT("v8::ObjectTemplate::NewInstance()", return Local<v8::Object>());
3585 LOG_API("ObjectTemplate::NewInstance"); 3590 LOG_API("ObjectTemplate::NewInstance");
3586 ENTER_V8; 3591 ENTER_V8;
3587 EXCEPTION_PREAMBLE(); 3592 EXCEPTION_PREAMBLE();
3588 i::Handle<i::Object> obj = 3593 i::Handle<i::Object> obj =
3589 i::Execution::InstantiateObject(Utils::OpenHandle(this), 3594 i::Execution::InstantiateObject(Utils::OpenHandle(this),
3590 &has_pending_exception); 3595 &has_pending_exception);
3591 EXCEPTION_BAILOUT_CHECK(Local<v8::Object>()); 3596 EXCEPTION_BAILOUT_CHECK(Local<v8::Object>());
3592 return Utils::ToLocal(i::Handle<i::JSObject>::cast(obj)); 3597 return Utils::ToLocal(i::Handle<i::JSObject>::cast(obj));
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
4109 } 4114 }
4110 4115
4111 4116
4112 void V8::SetFailedAccessCheckCallbackFunction( 4117 void V8::SetFailedAccessCheckCallbackFunction(
4113 FailedAccessCheckCallback callback) { 4118 FailedAccessCheckCallback callback) {
4114 if (IsDeadCheck("v8::V8::SetFailedAccessCheckCallbackFunction()")) return; 4119 if (IsDeadCheck("v8::V8::SetFailedAccessCheckCallbackFunction()")) return;
4115 i::Top::SetFailedAccessCheckCallback(callback); 4120 i::Top::SetFailedAccessCheckCallback(callback);
4116 } 4121 }
4117 4122
4118 4123
4119 void V8::AddObjectGroup(Persistent<Value>* objects, size_t length) { 4124 void V8::AddObjectGroup(Persistent<Value>* objects,
4125 size_t length,
4126 RetainedObjectInfo* info) {
4120 if (IsDeadCheck("v8::V8::AddObjectGroup()")) return; 4127 if (IsDeadCheck("v8::V8::AddObjectGroup()")) return;
4121 STATIC_ASSERT(sizeof(Persistent<Value>) == sizeof(i::Object**)); 4128 STATIC_ASSERT(sizeof(Persistent<Value>) == sizeof(i::Object**));
4122 i::GlobalHandles::AddGroup(reinterpret_cast<i::Object***>(objects), length); 4129 i::GlobalHandles::AddGroup(
4130 reinterpret_cast<i::Object***>(objects), length, info);
4123 } 4131 }
4124 4132
4125 4133
4126 int V8::AdjustAmountOfExternalAllocatedMemory(int change_in_bytes) { 4134 int V8::AdjustAmountOfExternalAllocatedMemory(int change_in_bytes) {
4127 if (IsDeadCheck("v8::V8::AdjustAmountOfExternalAllocatedMemory()")) return 0; 4135 if (IsDeadCheck("v8::V8::AdjustAmountOfExternalAllocatedMemory()")) return 0;
4128 return i::Heap::AdjustAmountOfExternalAllocatedMemory(change_in_bytes); 4136 return i::Heap::AdjustAmountOfExternalAllocatedMemory(change_in_bytes);
4129 } 4137 }
4130 4138
4131 4139
4132 void V8::SetGlobalGCPrologueCallback(GCCallback callback) { 4140 void V8::SetGlobalGCPrologueCallback(GCCallback callback) {
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
5058 internal_type = i::HeapSnapshot::kAggregated; 5066 internal_type = i::HeapSnapshot::kAggregated;
5059 break; 5067 break;
5060 default: 5068 default:
5061 UNREACHABLE(); 5069 UNREACHABLE();
5062 } 5070 }
5063 return reinterpret_cast<const HeapSnapshot*>( 5071 return reinterpret_cast<const HeapSnapshot*>(
5064 i::HeapProfiler::TakeSnapshot( 5072 i::HeapProfiler::TakeSnapshot(
5065 *Utils::OpenHandle(*title), internal_type, control)); 5073 *Utils::OpenHandle(*title), internal_type, control));
5066 } 5074 }
5067 5075
5076
5077 void HeapProfiler::DefineWrapperClass(uint16_t class_id,
5078 WrapperInfoCallback callback) {
5079 i::HeapProfiler::DefineWrapperClass(class_id, callback);
5080 }
5081
5068 #endif // ENABLE_LOGGING_AND_PROFILING 5082 #endif // ENABLE_LOGGING_AND_PROFILING
5069 5083
5070 5084
5071 v8::Testing::StressType internal::Testing::stress_type_ = 5085 v8::Testing::StressType internal::Testing::stress_type_ =
5072 v8::Testing::kStressTypeOpt; 5086 v8::Testing::kStressTypeOpt;
5073 5087
5074 5088
5075 void Testing::SetStressRunType(Testing::StressType type) { 5089 void Testing::SetStressRunType(Testing::StressType type) {
5076 internal::Testing::set_stress_type(type); 5090 internal::Testing::set_stress_type(type);
5077 } 5091 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
5122 SetFlagsFromString(kForcedOptimizations); 5136 SetFlagsFromString(kForcedOptimizations);
5123 } else if (run == GetStressRuns() - 2) { 5137 } else if (run == GetStressRuns() - 2) {
5124 SetFlagsFromString(kEagerOptimizations); 5138 SetFlagsFromString(kEagerOptimizations);
5125 } else { 5139 } else {
5126 SetFlagsFromString(kLazyOptimizations); 5140 SetFlagsFromString(kLazyOptimizations);
5127 } 5141 }
5128 #endif 5142 #endif
5129 } 5143 }
5130 5144
5131 5145
5146 void Testing::DeoptimizeAll() {
5147 internal::Deoptimizer::DeoptimizeAll();
5148 }
5149
5150
5132 namespace internal { 5151 namespace internal {
5133 5152
5134 5153
5135 HandleScopeImplementer* HandleScopeImplementer::instance() { 5154 HandleScopeImplementer* HandleScopeImplementer::instance() {
5136 return &thread_local; 5155 return &thread_local;
5137 } 5156 }
5138 5157
5139 5158
5140 void HandleScopeImplementer::FreeThreadResources() { 5159 void HandleScopeImplementer::FreeThreadResources() {
5141 thread_local.Free(); 5160 thread_local.Free();
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
5205 5224
5206 5225
5207 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 5226 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
5208 HandleScopeImplementer* thread_local = 5227 HandleScopeImplementer* thread_local =
5209 reinterpret_cast<HandleScopeImplementer*>(storage); 5228 reinterpret_cast<HandleScopeImplementer*>(storage);
5210 thread_local->IterateThis(v); 5229 thread_local->IterateThis(v);
5211 return storage + ArchiveSpacePerThread(); 5230 return storage + ArchiveSpacePerThread();
5212 } 5231 }
5213 5232
5214 } } // namespace v8::internal 5233 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « samples/shell.cc ('k') | src/arm/assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698