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

Side by Side Diff: src/handles.cc

Issue 55007: Mark some of the places we leave V8 via callbacks as transitions to... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 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 | « src/builtins.cc ('k') | src/log.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 v8::Utils::ToLocal(receiver), 423 v8::Utils::ToLocal(receiver),
424 v8::Utils::ToLocal(data), 424 v8::Utils::ToLocal(data),
425 v8::Utils::ToLocal(object)); 425 v8::Utils::ToLocal(object));
426 v8::Handle<v8::Array> result; 426 v8::Handle<v8::Array> result;
427 if (!interceptor->enumerator()->IsUndefined()) { 427 if (!interceptor->enumerator()->IsUndefined()) {
428 v8::NamedPropertyEnumerator enum_fun = 428 v8::NamedPropertyEnumerator enum_fun =
429 v8::ToCData<v8::NamedPropertyEnumerator>(interceptor->enumerator()); 429 v8::ToCData<v8::NamedPropertyEnumerator>(interceptor->enumerator());
430 LOG(ApiObjectAccess("interceptor-named-enum", *object)); 430 LOG(ApiObjectAccess("interceptor-named-enum", *object));
431 { 431 {
432 // Leaving JavaScript. 432 // Leaving JavaScript.
433 VMState state(OTHER); 433 VMState state(EXTERNAL);
434 result = enum_fun(info); 434 result = enum_fun(info);
435 } 435 }
436 } 436 }
437 return result; 437 return result;
438 } 438 }
439 439
440 440
441 // Compute the element keys from the interceptor. 441 // Compute the element keys from the interceptor.
442 v8::Handle<v8::Array> GetKeysForIndexedInterceptor(Handle<JSObject> receiver, 442 v8::Handle<v8::Array> GetKeysForIndexedInterceptor(Handle<JSObject> receiver,
443 Handle<JSObject> object) { 443 Handle<JSObject> object) {
444 Handle<InterceptorInfo> interceptor(object->GetIndexedInterceptor()); 444 Handle<InterceptorInfo> interceptor(object->GetIndexedInterceptor());
445 Handle<Object> data(interceptor->data()); 445 Handle<Object> data(interceptor->data());
446 v8::AccessorInfo info( 446 v8::AccessorInfo info(
447 v8::Utils::ToLocal(receiver), 447 v8::Utils::ToLocal(receiver),
448 v8::Utils::ToLocal(data), 448 v8::Utils::ToLocal(data),
449 v8::Utils::ToLocal(object)); 449 v8::Utils::ToLocal(object));
450 v8::Handle<v8::Array> result; 450 v8::Handle<v8::Array> result;
451 if (!interceptor->enumerator()->IsUndefined()) { 451 if (!interceptor->enumerator()->IsUndefined()) {
452 v8::IndexedPropertyEnumerator enum_fun = 452 v8::IndexedPropertyEnumerator enum_fun =
453 v8::ToCData<v8::IndexedPropertyEnumerator>(interceptor->enumerator()); 453 v8::ToCData<v8::IndexedPropertyEnumerator>(interceptor->enumerator());
454 LOG(ApiObjectAccess("interceptor-indexed-enum", *object)); 454 LOG(ApiObjectAccess("interceptor-indexed-enum", *object));
455 { 455 {
456 // Leaving JavaScript. 456 // Leaving JavaScript.
457 VMState state(OTHER); 457 VMState state(EXTERNAL);
458 result = enum_fun(info); 458 result = enum_fun(info);
459 } 459 }
460 } 460 }
461 return result; 461 return result;
462 } 462 }
463 463
464 464
465 Handle<FixedArray> GetKeysInFixedArrayFor(Handle<JSObject> object) { 465 Handle<FixedArray> GetKeysInFixedArrayFor(Handle<JSObject> object) {
466 Handle<FixedArray> content = Factory::empty_fixed_array(); 466 Handle<FixedArray> content = Factory::empty_fixed_array();
467 467
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 Handle<Context> compile_context, 674 Handle<Context> compile_context,
675 Handle<Context> function_context) { 675 Handle<Context> function_context) {
676 Handle<FixedArray> arr = Factory::NewFixedArray(3); 676 Handle<FixedArray> arr = Factory::NewFixedArray(3);
677 arr->set(0, Smi::FromInt(index)); 677 arr->set(0, Smi::FromInt(index));
678 arr->set(1, *compile_context); // Compile in this context 678 arr->set(1, *compile_context); // Compile in this context
679 arr->set(2, *function_context); // Set function context to this 679 arr->set(2, *function_context); // Set function context to this
680 fun->shared()->set_lazy_load_data(*arr); 680 fun->shared()->set_lazy_load_data(*arr);
681 } 681 }
682 682
683 } } // namespace v8::internal 683 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698