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/ia32/lithium-ia32.h

Issue 10534006: Remove TLS access for current Zone. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review. Created 8 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/ia32/lithium-gap-resolver-ia32.cc ('k') | src/ia32/lithium-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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 320
321 enum InnerPosition { 321 enum InnerPosition {
322 BEFORE, 322 BEFORE,
323 START, 323 START,
324 END, 324 END,
325 AFTER, 325 AFTER,
326 FIRST_INNER_POSITION = BEFORE, 326 FIRST_INNER_POSITION = BEFORE,
327 LAST_INNER_POSITION = AFTER 327 LAST_INNER_POSITION = AFTER
328 }; 328 };
329 329
330 LParallelMove* GetOrCreateParallelMove(InnerPosition pos) { 330 LParallelMove* GetOrCreateParallelMove(InnerPosition pos, Zone* zone) {
331 if (parallel_moves_[pos] == NULL) parallel_moves_[pos] = new LParallelMove; 331 if (parallel_moves_[pos] == NULL) {
332 parallel_moves_[pos] = new(zone) LParallelMove(zone);
333 }
332 return parallel_moves_[pos]; 334 return parallel_moves_[pos];
333 } 335 }
334 336
335 LParallelMove* GetParallelMove(InnerPosition pos) { 337 LParallelMove* GetParallelMove(InnerPosition pos) {
336 return parallel_moves_[pos]; 338 return parallel_moves_[pos];
337 } 339 }
338 340
339 private: 341 private:
340 LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1]; 342 LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1];
341 HBasicBlock* block_; 343 HBasicBlock* block_;
(...skipping 1958 matching lines...) Expand 10 before | Expand all | Expand 10 after
2300 }; 2302 };
2301 2303
2302 2304
2303 class LChunkBuilder; 2305 class LChunkBuilder;
2304 class LChunk: public ZoneObject { 2306 class LChunk: public ZoneObject {
2305 public: 2307 public:
2306 LChunk(CompilationInfo* info, HGraph* graph) 2308 LChunk(CompilationInfo* info, HGraph* graph)
2307 : spill_slot_count_(0), 2309 : spill_slot_count_(0),
2308 info_(info), 2310 info_(info),
2309 graph_(graph), 2311 graph_(graph),
2310 instructions_(32), 2312 instructions_(32, graph->zone()),
2311 pointer_maps_(8), 2313 pointer_maps_(8, graph->zone()),
2312 inlined_closures_(1) { } 2314 inlined_closures_(1, graph->zone()) { }
2313 2315
2314 void AddInstruction(LInstruction* instruction, HBasicBlock* block); 2316 void AddInstruction(LInstruction* instruction, HBasicBlock* block);
2315 LConstantOperand* DefineConstantOperand(HConstant* constant); 2317 LConstantOperand* DefineConstantOperand(HConstant* constant);
2316 Handle<Object> LookupLiteral(LConstantOperand* operand) const; 2318 Handle<Object> LookupLiteral(LConstantOperand* operand) const;
2317 Representation LookupLiteralRepresentation(LConstantOperand* operand) const; 2319 Representation LookupLiteralRepresentation(LConstantOperand* operand) const;
2318 2320
2319 int GetNextSpillIndex(bool is_double); 2321 int GetNextSpillIndex(bool is_double);
2320 LOperand* GetNextSpillSlot(bool is_double); 2322 LOperand* GetNextSpillSlot(bool is_double);
2321 2323
2322 int ParameterAt(int index); 2324 int ParameterAt(int index);
(...skipping 24 matching lines...) Expand all
2347 LLabel* label = GetLabel(block_id); 2349 LLabel* label = GetLabel(block_id);
2348 ASSERT(!label->HasReplacement()); 2350 ASSERT(!label->HasReplacement());
2349 return label->label(); 2351 return label->label();
2350 } 2352 }
2351 2353
2352 const ZoneList<Handle<JSFunction> >* inlined_closures() const { 2354 const ZoneList<Handle<JSFunction> >* inlined_closures() const {
2353 return &inlined_closures_; 2355 return &inlined_closures_;
2354 } 2356 }
2355 2357
2356 void AddInlinedClosure(Handle<JSFunction> closure) { 2358 void AddInlinedClosure(Handle<JSFunction> closure) {
2357 inlined_closures_.Add(closure); 2359 inlined_closures_.Add(closure, zone());
2358 } 2360 }
2359 2361
2362 Zone* zone() const { return graph_->zone(); }
2363
2360 private: 2364 private:
2361 int spill_slot_count_; 2365 int spill_slot_count_;
2362 CompilationInfo* info_; 2366 CompilationInfo* info_;
2363 HGraph* const graph_; 2367 HGraph* const graph_;
2364 ZoneList<LInstruction*> instructions_; 2368 ZoneList<LInstruction*> instructions_;
2365 ZoneList<LPointerMap*> pointer_maps_; 2369 ZoneList<LPointerMap*> pointer_maps_;
2366 ZoneList<Handle<JSFunction> > inlined_closures_; 2370 ZoneList<Handle<JSFunction> > inlined_closures_;
2367 }; 2371 };
2368 2372
2369 2373
(...skipping 26 matching lines...) Expand all
2396 enum Status { 2400 enum Status {
2397 UNUSED, 2401 UNUSED,
2398 BUILDING, 2402 BUILDING,
2399 DONE, 2403 DONE,
2400 ABORTED 2404 ABORTED
2401 }; 2405 };
2402 2406
2403 LChunk* chunk() const { return chunk_; } 2407 LChunk* chunk() const { return chunk_; }
2404 CompilationInfo* info() const { return info_; } 2408 CompilationInfo* info() const { return info_; }
2405 HGraph* graph() const { return graph_; } 2409 HGraph* graph() const { return graph_; }
2406 Zone* zone() { return zone_; } 2410 Zone* zone() const { return zone_; }
2407 2411
2408 bool is_unused() const { return status_ == UNUSED; } 2412 bool is_unused() const { return status_ == UNUSED; }
2409 bool is_building() const { return status_ == BUILDING; } 2413 bool is_building() const { return status_ == BUILDING; }
2410 bool is_done() const { return status_ == DONE; } 2414 bool is_done() const { return status_ == DONE; }
2411 bool is_aborted() const { return status_ == ABORTED; } 2415 bool is_aborted() const { return status_ == ABORTED; }
2412 2416
2413 void Abort(const char* format, ...); 2417 void Abort(const char* format, ...);
2414 2418
2415 // Methods for getting operands for Use / Define / Temp. 2419 // Methods for getting operands for Use / Define / Temp.
2416 LUnallocated* ToUnallocated(Register reg); 2420 LUnallocated* ToUnallocated(Register reg);
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
2520 2524
2521 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2525 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2522 }; 2526 };
2523 2527
2524 #undef DECLARE_HYDROGEN_ACCESSOR 2528 #undef DECLARE_HYDROGEN_ACCESSOR
2525 #undef DECLARE_CONCRETE_INSTRUCTION 2529 #undef DECLARE_CONCRETE_INSTRUCTION
2526 2530
2527 } } // namespace v8::internal 2531 } } // namespace v8::internal
2528 2532
2529 #endif // V8_IA32_LITHIUM_IA32_H_ 2533 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/lithium-gap-resolver-ia32.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698