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

Side by Side Diff: src/runtime.cc

Issue 504183002: Remove dead code from LookupResult (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Install the LoadFastElementStub descriptor and addressed comments Created 6 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/property-details.h ('k') | test/cctest/test-debug.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdlib.h> 5 #include <stdlib.h>
6 #include <limits> 6 #include <limits>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 10981 matching lines...) Expand 10 before | Expand all | Expand 10 after
10992 Handle<Object> maybe_pair; 10992 Handle<Object> maybe_pair;
10993 if (it.state() == LookupIterator::PROPERTY && 10993 if (it.state() == LookupIterator::PROPERTY &&
10994 it.property_kind() == LookupIterator::ACCESSOR) { 10994 it.property_kind() == LookupIterator::ACCESSOR) {
10995 maybe_pair = it.GetAccessors(); 10995 maybe_pair = it.GetAccessors();
10996 } 10996 }
10997 10997
10998 // If the callback object is a fixed array then it contains JavaScript 10998 // If the callback object is a fixed array then it contains JavaScript
10999 // getter and/or setter. 10999 // getter and/or setter.
11000 bool has_js_accessors = !maybe_pair.is_null() && maybe_pair->IsAccessorPair(); 11000 bool has_js_accessors = !maybe_pair.is_null() && maybe_pair->IsAccessorPair();
11001 Handle<FixedArray> details = 11001 Handle<FixedArray> details =
11002 isolate->factory()->NewFixedArray(has_js_accessors ? 5 : 2); 11002 isolate->factory()->NewFixedArray(has_js_accessors ? 6 : 3);
11003 details->set(0, *value); 11003 details->set(0, *value);
11004 // TODO(verwaest): Get rid of this random way of handling interceptors. 11004 // TODO(verwaest): Get rid of this random way of handling interceptors.
11005 PropertyDetails d = it.state() == LookupIterator::INTERCEPTOR 11005 PropertyDetails d = it.state() == LookupIterator::INTERCEPTOR
11006 ? PropertyDetails(NONE, INTERCEPTOR, 0) 11006 ? PropertyDetails(NONE, NORMAL, 0)
11007 : it.property_details(); 11007 : it.property_details();
11008 details->set(1, d.AsSmi()); 11008 details->set(1, d.AsSmi());
11009 details->set(
11010 2, isolate->heap()->ToBoolean(it.state() == LookupIterator::INTERCEPTOR));
11009 if (has_js_accessors) { 11011 if (has_js_accessors) {
11010 AccessorPair* accessors = AccessorPair::cast(*maybe_pair); 11012 AccessorPair* accessors = AccessorPair::cast(*maybe_pair);
11011 details->set(2, isolate->heap()->ToBoolean(has_caught)); 11013 details->set(3, isolate->heap()->ToBoolean(has_caught));
11012 details->set(3, accessors->GetComponent(ACCESSOR_GETTER)); 11014 details->set(4, accessors->GetComponent(ACCESSOR_GETTER));
11013 details->set(4, accessors->GetComponent(ACCESSOR_SETTER)); 11015 details->set(5, accessors->GetComponent(ACCESSOR_SETTER));
11014 } 11016 }
11015 11017
11016 return *isolate->factory()->NewJSArrayWithElements(details); 11018 return *isolate->factory()->NewJSArrayWithElements(details);
11017 } 11019 }
11018 11020
11019 11021
11020 RUNTIME_FUNCTION(Runtime_DebugGetProperty) { 11022 RUNTIME_FUNCTION(Runtime_DebugGetProperty) {
11021 HandleScope scope(isolate); 11023 HandleScope scope(isolate);
11022 11024
11023 DCHECK(args.length() == 2); 11025 DCHECK(args.length() == 2);
(...skipping 4626 matching lines...) Expand 10 before | Expand all | Expand 10 after
15650 } 15652 }
15651 return NULL; 15653 return NULL;
15652 } 15654 }
15653 15655
15654 15656
15655 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { 15657 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {
15656 return &(kIntrinsicFunctions[static_cast<int>(id)]); 15658 return &(kIntrinsicFunctions[static_cast<int>(id)]);
15657 } 15659 }
15658 15660
15659 } } // namespace v8::internal 15661 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/property-details.h ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698