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

Side by Side Diff: src/handles.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/handles.h ('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 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 Handle<Object> prototype) { 251 Handle<Object> prototype) {
252 ASSERT(function->should_have_prototype()); 252 ASSERT(function->should_have_prototype());
253 CALL_HEAP_FUNCTION(function->GetIsolate(), 253 CALL_HEAP_FUNCTION(function->GetIsolate(),
254 Accessors::FunctionSetPrototype(*function, 254 Accessors::FunctionSetPrototype(*function,
255 *prototype, 255 *prototype,
256 NULL), 256 NULL),
257 Object); 257 Object);
258 } 258 }
259 259
260 260
261 Handle<Object> SetProperty(Handle<JSObject> object, 261 Handle<Object> SetProperty(Handle<JSReceiver> object,
262 Handle<String> key, 262 Handle<String> key,
263 Handle<Object> value, 263 Handle<Object> value,
264 PropertyAttributes attributes, 264 PropertyAttributes attributes,
265 StrictModeFlag strict_mode) { 265 StrictModeFlag strict_mode) {
266 CALL_HEAP_FUNCTION(object->GetIsolate(), 266 CALL_HEAP_FUNCTION(object->GetIsolate(),
267 object->SetProperty(*key, *value, attributes, strict_mode), 267 object->SetProperty(*key, *value, attributes, strict_mode),
268 Object); 268 Object);
269 } 269 }
270 270
271 271
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 StrictModeFlag strict_mode) { 346 StrictModeFlag strict_mode) {
347 CALL_HEAP_FUNCTION(object->GetIsolate(), 347 CALL_HEAP_FUNCTION(object->GetIsolate(),
348 object->SetPropertyWithInterceptor(*key, 348 object->SetPropertyWithInterceptor(*key,
349 *value, 349 *value,
350 attributes, 350 attributes,
351 strict_mode), 351 strict_mode),
352 Object); 352 Object);
353 } 353 }
354 354
355 355
356 Handle<Object> GetProperty(Handle<JSObject> obj, 356 Handle<Object> GetProperty(Handle<JSReceiver> obj,
357 const char* name) { 357 const char* name) {
358 Isolate* isolate = obj->GetIsolate(); 358 Isolate* isolate = obj->GetIsolate();
359 Handle<String> str = isolate->factory()->LookupAsciiSymbol(name); 359 Handle<String> str = isolate->factory()->LookupAsciiSymbol(name);
360 CALL_HEAP_FUNCTION(isolate, obj->GetProperty(*str), Object); 360 CALL_HEAP_FUNCTION(isolate, obj->GetProperty(*str), Object);
361 } 361 }
362 362
363 363
364 Handle<Object> GetProperty(Handle<Object> obj, 364 Handle<Object> GetProperty(Handle<Object> obj,
365 const char* name,
366 LookupResult* result) {
367 Isolate* isolate = Isolate::Current();
368 Handle<String> str = isolate->factory()->LookupAsciiSymbol(name);
369 PropertyAttributes attributes;
370 CALL_HEAP_FUNCTION(
371 isolate, obj->GetProperty(*obj, result, *str, &attributes), Object);
372 }
373
374
375 Handle<Object> GetProperty(Handle<Object> obj,
376 Handle<Object> key) { 365 Handle<Object> key) {
377 Isolate* isolate = Isolate::Current(); 366 Isolate* isolate = Isolate::Current();
378 CALL_HEAP_FUNCTION(isolate, 367 CALL_HEAP_FUNCTION(isolate,
379 Runtime::GetObjectProperty(isolate, obj, key), Object); 368 Runtime::GetObjectProperty(isolate, obj, key), Object);
380 } 369 }
381 370
382 371
383 Handle<Object> GetProperty(Handle<JSObject> obj, 372 Handle<Object> GetProperty(Handle<JSReceiver> obj,
384 Handle<String> name, 373 Handle<String> name,
385 LookupResult* result) { 374 LookupResult* result) {
386 PropertyAttributes attributes; 375 PropertyAttributes attributes;
387 Isolate* isolate = Isolate::Current(); 376 Isolate* isolate = Isolate::Current();
388 CALL_HEAP_FUNCTION(isolate, 377 CALL_HEAP_FUNCTION(isolate,
389 obj->GetProperty(*obj, result, *name, &attributes), 378 obj->GetProperty(*obj, result, *name, &attributes),
390 Object); 379 Object);
391 } 380 }
392 381
393 382
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 967
979 bool CompileOptimized(Handle<JSFunction> function, 968 bool CompileOptimized(Handle<JSFunction> function,
980 int osr_ast_id, 969 int osr_ast_id,
981 ClearExceptionFlag flag) { 970 ClearExceptionFlag flag) {
982 CompilationInfo info(function); 971 CompilationInfo info(function);
983 info.SetOptimizing(osr_ast_id); 972 info.SetOptimizing(osr_ast_id);
984 return CompileLazyHelper(&info, flag); 973 return CompileLazyHelper(&info, flag);
985 } 974 }
986 975
987 } } // namespace v8::internal 976 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/handles.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698