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

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

Issue 3117006: Handle overwriting valueOf on String objects correctly when adding... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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/ia32/codegen-ia32.cc ('k') | src/ia32/macro-assembler-ia32.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 2036 matching lines...) Expand 10 before | Expand all | Expand 10 after
2047 __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset)); 2047 __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset));
2048 __ movzx_b(ebx, FieldOperand(ebx, Map::kBitFieldOffset)); 2048 __ movzx_b(ebx, FieldOperand(ebx, Map::kBitFieldOffset));
2049 __ test(ebx, Immediate(1 << Map::kIsUndetectable)); 2049 __ test(ebx, Immediate(1 << Map::kIsUndetectable));
2050 __ j(not_zero, if_true); 2050 __ j(not_zero, if_true);
2051 __ jmp(if_false); 2051 __ jmp(if_false);
2052 2052
2053 Apply(context_, if_true, if_false); 2053 Apply(context_, if_true, if_false);
2054 } 2054 }
2055 2055
2056 2056
2057 void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf(
2058 ZoneList<Expression*>* args) {
2059 ASSERT(args->length() == 1);
2060
2061 VisitForValue(args->at(0), kAccumulator);
2062
2063 Label materialize_true, materialize_false;
2064 Label* if_true = NULL;
2065 Label* if_false = NULL;
2066 PrepareTest(&materialize_true, &materialize_false, &if_true, &if_false);
2067
2068 // Just indicate false, as %_IsStringWrapperSafeForDefaultValueOf() is only
2069 // used in a few functions in runtime.js which should not normally be hit by
2070 // this compiler.
2071 __ jmp(if_false);
2072 Apply(context_, if_true, if_false);
2073 }
2074
2075
2057 void FullCodeGenerator::EmitIsFunction(ZoneList<Expression*>* args) { 2076 void FullCodeGenerator::EmitIsFunction(ZoneList<Expression*>* args) {
2058 ASSERT(args->length() == 1); 2077 ASSERT(args->length() == 1);
2059 2078
2060 VisitForValue(args->at(0), kAccumulator); 2079 VisitForValue(args->at(0), kAccumulator);
2061 2080
2062 Label materialize_true, materialize_false; 2081 Label materialize_true, materialize_false;
2063 Label* if_true = NULL; 2082 Label* if_true = NULL;
2064 Label* if_false = NULL; 2083 Label* if_false = NULL;
2065 PrepareTest(&materialize_true, &materialize_false, &if_true, &if_false); 2084 PrepareTest(&materialize_true, &materialize_false, &if_true, &if_false);
2066 2085
(...skipping 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after
3336 // And return. 3355 // And return.
3337 __ ret(0); 3356 __ ret(0);
3338 } 3357 }
3339 3358
3340 3359
3341 #undef __ 3360 #undef __
3342 3361
3343 } } // namespace v8::internal 3362 } } // namespace v8::internal
3344 3363
3345 #endif // V8_TARGET_ARCH_IA32 3364 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698