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

Side by Side Diff: src/handles.cc

Issue 12319144: Avoid TLS accesses in Object::Lookup and Object::GetPrototype. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Simplified Object::GetPrototype a bit Created 7 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/hydrogen.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 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 Handle<JSObject> arguments_boilerplate = Handle<JSObject>( 640 Handle<JSObject> arguments_boilerplate = Handle<JSObject>(
641 isolate->context()->native_context()->arguments_boilerplate(), 641 isolate->context()->native_context()->arguments_boilerplate(),
642 isolate); 642 isolate);
643 Handle<JSFunction> arguments_function = Handle<JSFunction>( 643 Handle<JSFunction> arguments_function = Handle<JSFunction>(
644 JSFunction::cast(arguments_boilerplate->map()->constructor()), 644 JSFunction::cast(arguments_boilerplate->map()->constructor()),
645 isolate); 645 isolate);
646 646
647 // Only collect keys if access is permitted. 647 // Only collect keys if access is permitted.
648 for (Handle<Object> p = object; 648 for (Handle<Object> p = object;
649 *p != isolate->heap()->null_value(); 649 *p != isolate->heap()->null_value();
650 p = Handle<Object>(p->GetPrototype(), isolate)) { 650 p = Handle<Object>(p->GetPrototype(isolate), isolate)) {
651 if (p->IsJSProxy()) { 651 if (p->IsJSProxy()) {
652 Handle<JSProxy> proxy(JSProxy::cast(*p), isolate); 652 Handle<JSProxy> proxy(JSProxy::cast(*p), isolate);
653 Handle<Object> args[] = { proxy }; 653 Handle<Object> args[] = { proxy };
654 Handle<Object> names = Execution::Call( 654 Handle<Object> names = Execution::Call(
655 isolate->proxy_enumerate(), object, ARRAY_SIZE(args), args, threw); 655 isolate->proxy_enumerate(), object, ARRAY_SIZE(args), args, threw);
656 if (*threw) return content; 656 if (*threw) return content;
657 content = AddKeysFromJSArray(content, Handle<JSArray>::cast(names)); 657 content = AddKeysFromJSArray(content, Handle<JSArray>::cast(names));
658 break; 658 break;
659 } 659 }
660 660
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 data->next = prev_next_; 926 data->next = prev_next_;
927 data->limit = prev_limit_; 927 data->limit = prev_limit_;
928 #ifdef DEBUG 928 #ifdef DEBUG
929 handles_detached_ = true; 929 handles_detached_ = true;
930 #endif 930 #endif
931 return deferred; 931 return deferred;
932 } 932 }
933 933
934 934
935 } } // namespace v8::internal 935 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698