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

Side by Side Diff: src/hydrogen.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.cc ('k') | src/hydrogen-instructions.h » ('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 5300 matching lines...) Expand 10 before | Expand all | Expand 10 after
5311 AddInstruction(new(zone()) HCheckFunction(right, target)); 5311 AddInstruction(new(zone()) HCheckFunction(right, target));
5312 instr = new(zone()) HInstanceOfKnownGlobal(left, target); 5312 instr = new(zone()) HInstanceOfKnownGlobal(left, target);
5313 } 5313 }
5314 } else if (op == Token::IN) { 5314 } else if (op == Token::IN) {
5315 instr = new(zone()) HIn(left, right); 5315 instr = new(zone()) HIn(left, right);
5316 } else if (type_info.IsNonPrimitive()) { 5316 } else if (type_info.IsNonPrimitive()) {
5317 switch (op) { 5317 switch (op) {
5318 case Token::EQ: 5318 case Token::EQ:
5319 case Token::EQ_STRICT: { 5319 case Token::EQ_STRICT: {
5320 AddInstruction(new(zone()) HCheckNonSmi(left)); 5320 AddInstruction(new(zone()) HCheckNonSmi(left));
5321 AddInstruction(HCheckInstanceType::NewIsJSObjectOrJSFunction(left)); 5321 AddInstruction(HCheckInstanceType::NewIsSpecObject(left));
5322 AddInstruction(new(zone()) HCheckNonSmi(right)); 5322 AddInstruction(new(zone()) HCheckNonSmi(right));
5323 AddInstruction(HCheckInstanceType::NewIsJSObjectOrJSFunction(right)); 5323 AddInstruction(HCheckInstanceType::NewIsSpecObject(right));
5324 instr = new(zone()) HCompareJSObjectEq(left, right); 5324 instr = new(zone()) HCompareJSObjectEq(left, right);
5325 break; 5325 break;
5326 } 5326 }
5327 default: 5327 default:
5328 return Bailout("Unsupported non-primitive compare"); 5328 return Bailout("Unsupported non-primitive compare");
5329 break; 5329 break;
5330 } 5330 }
5331 } else if (type_info.IsString() && oracle()->IsSymbolCompare(expr) && 5331 } else if (type_info.IsString() && oracle()->IsSymbolCompare(expr) &&
5332 (op == Token::EQ || op == Token::EQ_STRICT)) { 5332 (op == Token::EQ || op == Token::EQ_STRICT)) {
5333 instr = BuildSymbolCompare(left, right, op); 5333 instr = BuildSymbolCompare(left, right, op);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
5391 HIsSmi* result = new(zone()) HIsSmi(value); 5391 HIsSmi* result = new(zone()) HIsSmi(value);
5392 ast_context()->ReturnInstruction(result, call->id()); 5392 ast_context()->ReturnInstruction(result, call->id());
5393 } 5393 }
5394 5394
5395 5395
5396 void HGraphBuilder::GenerateIsSpecObject(CallRuntime* call) { 5396 void HGraphBuilder::GenerateIsSpecObject(CallRuntime* call) {
5397 ASSERT(call->arguments()->length() == 1); 5397 ASSERT(call->arguments()->length() == 1);
5398 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 5398 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
5399 HValue* value = Pop(); 5399 HValue* value = Pop();
5400 HHasInstanceType* result = 5400 HHasInstanceType* result =
5401 new(zone()) HHasInstanceType(value, FIRST_JS_OBJECT_TYPE, LAST_TYPE); 5401 new(zone()) HHasInstanceType(value,
5402 FIRST_SPEC_OBJECT_TYPE,
5403 LAST_SPEC_OBJECT_TYPE);
5402 ast_context()->ReturnInstruction(result, call->id()); 5404 ast_context()->ReturnInstruction(result, call->id());
5403 } 5405 }
5404 5406
5405 5407
5406 void HGraphBuilder::GenerateIsFunction(CallRuntime* call) { 5408 void HGraphBuilder::GenerateIsFunction(CallRuntime* call) {
5407 ASSERT(call->arguments()->length() == 1); 5409 ASSERT(call->arguments()->length() == 1);
5408 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 5410 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
5409 HValue* value = Pop(); 5411 HValue* value = Pop();
5410 HHasInstanceType* result = 5412 HHasInstanceType* result =
5411 new(zone()) HHasInstanceType(value, JS_FUNCTION_TYPE); 5413 new(zone()) HHasInstanceType(value, JS_FUNCTION_TYPE);
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
6304 } 6306 }
6305 } 6307 }
6306 6308
6307 #ifdef DEBUG 6309 #ifdef DEBUG
6308 if (graph_ != NULL) graph_->Verify(); 6310 if (graph_ != NULL) graph_->Verify();
6309 if (allocator_ != NULL) allocator_->Verify(); 6311 if (allocator_ != NULL) allocator_->Verify();
6310 #endif 6312 #endif
6311 } 6313 }
6312 6314
6313 } } // namespace v8::internal 6315 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/handles.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698