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

Side by Side Diff: src/runtime.cc

Issue 6992072: Implement set trap for proxies, and revamp class hierarchy in preparation (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review. Created 9 years, 6 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/proxy.js ('k') | src/x64/builtins-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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 3703 matching lines...) Expand 10 before | Expand all | Expand 10 after
3714 Execution::ToString(key, &has_pending_exception); 3714 Execution::ToString(key, &has_pending_exception);
3715 if (has_pending_exception) return Failure::Exception(); 3715 if (has_pending_exception) return Failure::Exception();
3716 name = Handle<String>::cast(converted); 3716 name = Handle<String>::cast(converted);
3717 } 3717 }
3718 3718
3719 // Check if the name is trivially convertible to an index and get 3719 // Check if the name is trivially convertible to an index and get
3720 // the element if so. 3720 // the element if so.
3721 if (name->AsArrayIndex(&index)) { 3721 if (name->AsArrayIndex(&index)) {
3722 return GetElementOrCharAt(isolate, object, index); 3722 return GetElementOrCharAt(isolate, object, index);
3723 } else { 3723 } else {
3724 PropertyAttributes attr; 3724 return object->GetProperty(*name);
3725 return object->GetProperty(*name, &attr);
3726 } 3725 }
3727 } 3726 }
3728 3727
3729 3728
3730 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetProperty) { 3729 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetProperty) {
3731 NoHandleAllocation ha; 3730 NoHandleAllocation ha;
3732 ASSERT(args.length() == 2); 3731 ASSERT(args.length() == 2);
3733 3732
3734 Handle<Object> object = args.at<Object>(0); 3733 Handle<Object> object = args.at<Object>(0);
3735 Handle<Object> key = args.at<Object>(1); 3734 Handle<Object> key = args.at<Object>(1);
(...skipping 8589 matching lines...) Expand 10 before | Expand all | Expand 10 after
12325 } else { 12324 } else {
12326 // Handle last resort GC and make sure to allow future allocations 12325 // Handle last resort GC and make sure to allow future allocations
12327 // to grow the heap without causing GCs (if possible). 12326 // to grow the heap without causing GCs (if possible).
12328 isolate->counters()->gc_last_resort_from_js()->Increment(); 12327 isolate->counters()->gc_last_resort_from_js()->Increment();
12329 isolate->heap()->CollectAllGarbage(false); 12328 isolate->heap()->CollectAllGarbage(false);
12330 } 12329 }
12331 } 12330 }
12332 12331
12333 12332
12334 } } // namespace v8::internal 12333 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/proxy.js ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698