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

Side by Side Diff: src/typing.cc

Issue 22562004: Fix Object.freeze, Object.observe wrt CountOperation and CompoundAssignment. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add regression test Created 7 years, 4 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/hydrogen.cc ('k') | test/mjsunit/harmony/object-observe.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 381
382 382
383 void AstTyper::VisitAssignment(Assignment* expr) { 383 void AstTyper::VisitAssignment(Assignment* expr) {
384 // TODO(rossberg): Can we clean this up? 384 // TODO(rossberg): Can we clean this up?
385 if (expr->is_compound()) { 385 if (expr->is_compound()) {
386 // Collect type feedback. 386 // Collect type feedback.
387 Expression* target = expr->target(); 387 Expression* target = expr->target();
388 Property* prop = target->AsProperty(); 388 Property* prop = target->AsProperty();
389 if (prop != NULL) { 389 if (prop != NULL) {
390 prop->RecordTypeFeedback(oracle(), zone()); 390 prop->RecordTypeFeedback(oracle(), zone());
391 if (!prop->key()->IsPropertyName()) { // i.e., keyed 391 expr->RecordTypeFeedback(oracle(), zone());
392 expr->RecordTypeFeedback(oracle(), zone());
393 }
394 } 392 }
395 393
396 RECURSE(Visit(expr->binary_operation())); 394 RECURSE(Visit(expr->binary_operation()));
397 395
398 NarrowType(expr, expr->binary_operation()->bounds()); 396 NarrowType(expr, expr->binary_operation()->bounds());
399 } else { 397 } else {
400 // Collect type feedback. 398 // Collect type feedback.
401 if (expr->target()->IsProperty()) { 399 if (expr->target()->IsProperty()) {
402 expr->RecordTypeFeedback(oracle(), zone()); 400 expr->RecordTypeFeedback(oracle(), zone());
403 } 401 }
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 void AstTyper::VisitModuleUrl(ModuleUrl* module) { 695 void AstTyper::VisitModuleUrl(ModuleUrl* module) {
698 } 696 }
699 697
700 698
701 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { 699 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) {
702 RECURSE(Visit(stmt->body())); 700 RECURSE(Visit(stmt->body()));
703 } 701 }
704 702
705 703
706 } } // namespace v8::internal 704 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | test/mjsunit/harmony/object-observe.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698