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

Side by Side Diff: src/ia32/full-codegen-ia32.cc

Issue 639123009: Classes: Add basic support for properties (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Use define data property instead Created 6 years, 2 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 | test/mjsunit/harmony/classes.js » ('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 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 2424 matching lines...) Expand 10 before | Expand all | Expand 10 after
2435 case ObjectLiteral::Property::CONSTANT: 2435 case ObjectLiteral::Property::CONSTANT:
2436 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 2436 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
2437 case ObjectLiteral::Property::COMPUTED: 2437 case ObjectLiteral::Property::COMPUTED:
2438 if (property->is_static()) { 2438 if (property->is_static()) {
2439 __ push(Operand(esp, kPointerSize)); // constructor 2439 __ push(Operand(esp, kPointerSize)); // constructor
2440 } else { 2440 } else {
2441 __ push(Operand(esp, 0)); // prototype 2441 __ push(Operand(esp, 0)); // prototype
2442 } 2442 }
2443 VisitForStackValue(key); 2443 VisitForStackValue(key);
2444 VisitForStackValue(value); 2444 VisitForStackValue(value);
2445 __ push(Immediate(Smi::FromInt(SLOPPY))); // Strict mode 2445 __ push(Immediate(Smi::FromInt(NONE)));
2446 __ CallRuntime(Runtime::kSetProperty, 4); 2446 __ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4);
Dmitry Lomov (no reviews) 2014/10/21 06:17:05 Ah, that's better, now I understand :) This one is
2447 break; 2447 break;
2448 2448
2449 case ObjectLiteral::Property::GETTER: { 2449 case ObjectLiteral::Property::GETTER: {
2450 ObjectLiteral::Accessors *accessors = 2450 ObjectLiteral::Accessors *accessors =
2451 accessor_table.lookup(key)->second; 2451 accessor_table.lookup(key)->second;
2452 accessors->getter = value; 2452 accessors->getter = value;
2453 if (property->is_static()) { 2453 if (property->is_static()) {
2454 __ push(Operand(esp, kPointerSize)); // constructor 2454 __ push(Operand(esp, kPointerSize)); // constructor
2455 } else { 2455 } else {
2456 __ push(Operand(esp, 0)); // prototype 2456 __ push(Operand(esp, 0)); // prototype
(...skipping 2770 matching lines...) Expand 10 before | Expand all | Expand 10 after
5227 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5227 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5228 Assembler::target_address_at(call_target_address, 5228 Assembler::target_address_at(call_target_address,
5229 unoptimized_code)); 5229 unoptimized_code));
5230 return OSR_AFTER_STACK_CHECK; 5230 return OSR_AFTER_STACK_CHECK;
5231 } 5231 }
5232 5232
5233 5233
5234 } } // namespace v8::internal 5234 } } // namespace v8::internal
5235 5235
5236 #endif // V8_TARGET_ARCH_IA32 5236 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/harmony/classes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698