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

Side by Side Diff: src/accessors.cc

Issue 540903002: Flatten property_kind into state. Add UNKNOWN as a state for dict-mode receivers (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add DCHECKs 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 | « no previous file | src/bootstrapper.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 "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/contexts.h" 10 #include "src/contexts.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 v8::Local<v8::Name> name, v8::Local<v8::Value> val, 174 v8::Local<v8::Name> name, v8::Local<v8::Value> val,
175 const v8::PropertyCallbackInfo<void>& info) { 175 const v8::PropertyCallbackInfo<void>& info) {
176 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate()); 176 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
177 HandleScope scope(isolate); 177 HandleScope scope(isolate);
178 Handle<JSObject> object = Utils::OpenHandle(*info.This()); 178 Handle<JSObject> object = Utils::OpenHandle(*info.This());
179 Handle<Object> value = Utils::OpenHandle(*val); 179 Handle<Object> value = Utils::OpenHandle(*val);
180 180
181 if (SetPropertyOnInstanceIfInherited(isolate, info, name, value)) return; 181 if (SetPropertyOnInstanceIfInherited(isolate, info, name, value)) return;
182 182
183 LookupIterator it(object, Utils::OpenHandle(*name)); 183 LookupIterator it(object, Utils::OpenHandle(*name));
184 CHECK(it.HasProperty()); 184 CHECK_EQ(LookupIterator::ACCESSOR, it.state());
185 DCHECK(it.HolderIsReceiverOrHiddenPrototype()); 185 DCHECK(it.HolderIsReceiverOrHiddenPrototype());
186 Object::SetDataProperty(&it, value); 186 Object::SetDataProperty(&it, value);
187 } 187 }
188 188
189 189
190 Handle<AccessorInfo> Accessors::ArgumentsIteratorInfo( 190 Handle<AccessorInfo> Accessors::ArgumentsIteratorInfo(
191 Isolate* isolate, PropertyAttributes attributes) { 191 Isolate* isolate, PropertyAttributes attributes) {
192 Handle<Name> name(isolate->native_context()->iterator_symbol(), isolate); 192 Handle<Name> name(isolate->native_context()->iterator_symbol(), isolate);
193 return MakeAccessor(isolate, name, &ArgumentsIteratorGetter, 193 return MakeAccessor(isolate, name, &ArgumentsIteratorGetter,
194 &ArgumentsIteratorSetter, attributes); 194 &ArgumentsIteratorSetter, attributes);
(...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1413 info->set_data(Smi::FromInt(index)); 1413 info->set_data(Smi::FromInt(index));
1414 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); 1414 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport);
1415 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); 1415 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport);
1416 info->set_getter(*getter); 1416 info->set_getter(*getter);
1417 if (!(attributes & ReadOnly)) info->set_setter(*setter); 1417 if (!(attributes & ReadOnly)) info->set_setter(*setter);
1418 return info; 1418 return info;
1419 } 1419 }
1420 1420
1421 1421
1422 } } // namespace v8::internal 1422 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698